コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 7 of about 7 for save (0.004 sec.)
Header Parameter Models 13104
Header Parameter Models Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you have a group of related header parameters , you can create a Pydantic model to decla ... tapi import FastAPI , Header from pydantic import BaseModel app = FastAPI () class CommonHeaders ( BaseModel ): host : str save_data : bool if_modified_since : str | None = None traceparent : str | None = None x_tag : list [ str ] = [] @app . get ( " ... tapi import FastAPI , Header from pydantic import BaseModel app = FastAPI () class CommonHeaders ( BaseModel ): host : str save_data : bool if_modified_since : Union [ str , None ] = None traceparent : Union [ str , None ] = None x_tag : list [ str ] ... ic import BaseModel from typing_extensions import Annotated app = FastAPI () class CommonHeaders ( BaseModel ): host : str save_data : bool if_modified_since : Union [ str , None ] = None traceparent : Union [ str , None ] = None x_tag : List [ str ] ...
https://man.mtool.work/fastapi/0.115/tutorial/header-param-models/
モデル - より詳しく 10269
モデル - より詳しく 先ほどの例に続き、複数の関連モデルを持つことが一般的です。 これはユーザーモデルの場合は特にそうです。なぜなら: 入力モデル にはパスワードが必要です。 出力モデル はパスワードをもつべきではありません。 データベースモデル は ... Union [ str , None ] = None def fake_password_hasher ( raw_password : str ): return "supersecret" + raw_password def fake_save_user ( user_in : UserIn ): hashed_password = fake_password_hasher ( user_in . password ) user_in_db = UserInDB ( ** user_i ... n . dict (), hashed_password = hashed_password ) print ( "User saved! ..not really" ) return user_in_db @app . post ( "/user/" , response_model = UserOut ) async def create_user ( user_in : ... UserIn ): user_saved = fake_save_user ( user_in ) return user_saved ? Other versions and variants Python 3.10+ from fastapi import FastAPI fro ...
https://man.mtool.work/fastapi/0.115/tutorial/extra-models/
Development - Contributing 8179
Development - Contributing Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . First, you might want to see the basic ways to help FastAPI and get help . Developing If ... e docs show your new section (the info box at the top is gone). ? Now you can translate it all and see how it looks as you save the file. Don't Translate these Pages ? Don't translate: Files under reference/ release-notes.md fastapi-people.md externa ... h the command serve : // Use the command "serve" after running "build-all" $ python ./scripts/docs.py serve Warning: this is a very simple server. For development, use mkdocs serve instead. This is here only to preview a site with translations alread ...
https://man.mtool.work/fastapi/0.115/contributing/
Generate Clients 8106
Generate Clients Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . As FastAPI is based on the OpenAPI specification, you get automatic compatibility with many tools, ... he frontend. Install openapi-ts You can install openapi-ts in your frontend code with: $ npm install @hey-api/openapi-ts --save-dev ---> 100% Generate Client Code To generate the client code you can use the command line application openapi-ts that wo ...
https://man.mtool.work/fastapi/0.115/advanced/generate-clients/
Custom Docs UI Static Assets (Self-Hosting) 8106
Custom Docs UI Static Assets (Self-Hosting) Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . The API docs use Swagger UI and ReDoc , and each of those need some Jav ... or the docs and put them on that static/ directory. You can probably right-click each link and select an option similar to Save link as... . Swagger UI uses the files: swagger-ui-bundle.js swagger-ui.css And ReDoc uses the file: redoc.standalone.js A ...
https://man.mtool.work/fastapi/0.115/how-to/custom-docs-ui-assets/
Release Notes 7888
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 ... tapi import FastAPI , Header from pydantic import BaseModel app = FastAPI () class CommonHeaders ( BaseModel ): host : str save_data : bool if_modified_since : str | None = None traceparent : str | None = None x_tag : list [ str ] = [] @app . get ( " ...
https://man.mtool.work/fastapi/0.115/release-notes/
Simple OAuth2 with Password and Bearer 7888
Simple OAuth2 with Password and Bearer Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Now let's build from the previous chapter and add the missing parts to have ... database, but we haven't checked the password. Let's put that data in the Pydantic UserInDB model first. You should never save plaintext passwords, so, we'll use the (fake) password hashing system. If the passwords don't match, we return the same er ...
https://man.mtool.work/fastapi/0.115/tutorial/security/simple-oauth2/
PREV 1 NEXT