Results of 1 - 5 of about 5 for Image (0.004 sec.)
- ボディ - ネストされたモデル 12593
- ボディ - ネストされたモデル FastAPI を使用すると、深くネストされた任意のモデルを定義、検証、文書化、使用することができます(Pydanticのおかげです)。 リストのフィールド 属性をサブタイプとして定義することができます。例えば、Pythonの list は以
...して、深くネストしたJSON object を宣言することができます。 すべては、任意のネストにされています。 サブモデルの定義 例えば、 Image モデルを定義することができます: Python 3.8+ from typing import Set , Union from fastapi import FastAPI from pydantic impor...t BaseModel app = FastAPI () class Image ( BaseModel ): url : str name : str class Item ( BaseModel ): name : str description : Union [ str , None ] = None price :...float tax : Union [ float , None ] = None tags : Set [ str ] = set () image : Union [ Image , None ] = None @app . put ( "/items/ {item_id} " ) async def update_item ( item_id : int , item : Item ):... - https://man.mtool.work/fastapi/0.115/tutorial/body-nested-models/
- Additional Responses in OpenAPI 9633
- Additional Responses in OpenAPI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Warning This is a rather advanced topic. If you are starting with FastAPI , you mig
...es parameter to add different media types for the same main response. For example, you can add an additional media type of image/png , declaring that your path operation can return a JSON object (with media type application/json ) or a PNG image: Pyth...ue : str app = FastAPI () @app . get ( "/items/ {item_id} " , response_model = Item , responses = { 200 : { "content" : { "image/png" : {}}, "description" : "Return the JSON item or an image." , } }, ) async def read_item ( item_id : str , img : Union...[ bool , None ] = None ): if img : return FileResponse ( "image.png" , media_type = "image/png" ) else : return { "id" : "foo" , "value" : "there goes my hero" } Note Notice that you hav... - https://man.mtool.work/fastapi/0.115/advanced/additional-responses/
- コンテナ内のFastAPI - Docker 7997
- コンテナ内のFastAPI - Docker FastAPIアプリケーションをデプロイする場合、一般的なアプローチは Linuxコンテナ・イメージ をビルドすることです。 基本的には Docker を用いて行われます。生成されたコンテナ・イメージは、いくつかの方法のいずれかでデプ
...ョンに対応している予め作成された 公式のコンテナ・イメージ をパブリックに提供しています。 例えば、公式イメージの1つに Python Image があります。 その他にも、データベースなどさまざまなイメージがあります: PostgreSQL MySQL MongoDB Redis , etc. 予め作成された...がなければ、実行中のコンテナを持つことはできないです。メイン・プロセスが停止すれば、コンテナも停止します。 Build a Docker Image for FastAPI ということで、何か作りましょう!? FastAPI用の Dockerイメージ を、 公式Python イメージに基づいて ゼロから ビルド...リに移動します( Dockerfile がある場所で、 app ディレクトリがあります) FastAPI イメージをビルドします: $ docker build -t myimage . ---> 100% Tip 末尾の . に注目してほしいです。これは ./ と同じ意味です。 これはDockerにコンテナイメージのビルドに使用する... - https://man.mtool.work/fastapi/0.115/deployment/docker/
- Release Notes 7850
- Release Notes Latest Changes 0.115.11 Fixes ? Add docs examples and tests (support) for Annotated custom validations, like AfterValidator , revert #13440 . PR #13442 by @tiangolo . New docs: Query Parameters and String Validations - Custom
...rawberry integration docs. PR #13155 by @kinuax . ? Remove unused Peewee tutorial files. PR #13158 by @alejsdev . ? Update image in body-nested-model docs. PR #11063 by @untilhamza . ? Update fastapi-cli UI examples in docs. PR #13107 by @Zhongheng-Ch...#11791 by @ceb10n . ? Update Chinese translation for docs/tutorial/security/oauth2-jwt.md . PR #11781 by @logan2d5 . ? Fix image missing in French translation for docs/fr/docs/async.md . PR #11787 by @pe-brian . ? Add Portuguese translation for docs/p...PR #11056 by @tiangolo . ? Update sponsors: TalkPython badge. PR #11052 by @tiangolo . ? Update sponsors: TalkPython badge image. PR #11048 by @tiangolo . ? Update sponsors, remove Deta. PR #11041 by @tiangolo . ? Fix CSS breaking RTL languages (erron... - https://man.mtool.work/fastapi/0.115/release-notes/
- Request Files 7813
- Request Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define files to be uploaded by the client using File . Info To receive uploaded files, first
...size limit, and after passing this limit it will be stored in disk. This means that it will work well for large files like images, videos, large binaries, etc. without consuming all the memory. You can get metadata from the uploaded file. It has a fil...UploadFile UploadFile has the following attributes: filename : A str with the original file name that was uploaded (e.g. myimage.jpg ). content_type : A str with the content type (MIME type / media type) (e.g. image/jpeg ). file : A SpooledTemporaryFi... - https://man.mtool.work/fastapi/0.115/tutorial/request-files/
PREV
1
NEXT