분류 전체보기 (67) 썸네일형 리스트형 kubernetes pod resources, env, ReplicationController 기본적인 kubernetes resource, option 등을 설명한 블로그입니다. 추가적인 기능을 보고싶으시면 docs를 참고바랍니다. https://kubernetes.io/docs/home/ Kubernetes Documentation Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source project is hosted by the Cloud Native Computing Foundation. kubernetes.io resource limits를 초과해서 사용하는 파드들.. kubernetes pod, static pod, self-healing, container type 기본적인 kubernetes resource, option 등을 설명한 블로그입니다. 추가적인 기능을 보고싶으시면 docs를 참고바랍니다. https://kubernetes.io/docs/home/ Kubernetes Documentation Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source project is hosted by the Cloud Native Computing Foundation. kubernetes.io kubectl edit pod [pod name] ->.. 내맘대로 Fastapi Document summary[6] # This is because OAuth2 uses "form data" for sending the username and password # pip install python-multipart from fastapi import Depends, FastAPI from fastapi.security import OAuth2PasswordBearer app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") # relative URL location of token # 연결시도할 때 token authorization을 # 위해 url로 가며 앞으로 token을 이용. @app.get("/items/") async def read_it.. kubernetes namespace, resourcequota 기본적인 kubernetes resource, option 등을 설명한 블로그입니다. 추가적인 기능을 보고싶으시면 docs를 참고바랍니다. https://kubernetes.io/docs/home/ Kubernetes Documentation Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source project is hosted by the Cloud Native Computing Foundation. kubernetes.io namespace는 하나의 cluster라고 생각하면 .. 내맘대로 Fastapi Document summary[5] # You only give Depends a single parameter. # This parameter must be something like a function. # async 안에 def or def 안에 async 다 가능 from typing import Optional from fastapi import Depends, FastAPI app = FastAPI() async def common_parameters(q: Optional[str] = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: di.. 내맘대로 Fastapi Document summary[4] @app.get("/users/", tags=["users"] summary="Create an item", description="", response_description="" deprecated=True, ) async def read_users(): return [{"username": "johndoe"}] # tags, summary, description, response_description, deprecated 등은 docs swagger에 보여준다. # description이 너무 길 경우 @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Creat.. 내맘대로 Fastapi Document summary[3] $ pip install python-multipart from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: bytes = File(...)): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile = File(...)): return {"filename": file.filename} # To declare File bodies, you need to use File, because otherwise # the parameters .. 내맘대로 Fastapi docs 정리(Response Model, Extra Model) from typing import Optional from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: Optional[str] = None class UserOut(BaseModel): username: str email: EmailStr full_name: Optional[str] = None @app.post("/user/", response_model=UserOut) async def create_user(user: UserIn): return user use.. 이전 1 ··· 3 4 5 6 7 8 9 다음 목록 더보기