- Sort Score
- Result 10 results
- Languages All
Results 331 - 340 of 766 for posty (0.02 sec)
-
docs_src/separate_openapi_schemas/tutorial001_py39.py
from typing import Optional from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: Optional[str] = None app = FastAPI() @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item( name="Portal Gun",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 483 bytes - Viewed (0) -
docs_src/generate_clients/tutorial001.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str @app.post("/items/", response_model=ResponseMessage) async def create_item(item: Item): return {"message": "item received"} @app.get("/items/", response_model=List[Item]) async def get_items(): return [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 04 22:02:18 UTC 2022 - 519 bytes - Viewed (0) -
tests/test_openapi_examples.py
from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): data: str @app.post("/examples/") def examples( item: Item = Body( examples=[ {"data": "Data in Body examples, example1"}, ], openapi_examples={ "Example One": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 15:57:43 UTC 2024 - 17.7K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_py310.py
def get_session(): with Session(engine) as session: yield session app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/", response_model=HeroPublic) def create_hero(hero: HeroCreate, session: Session = Depends(get_session)): db_hero = Hero.model_validate(hero) session.add(db_hero) session.commit()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.5K bytes - Viewed (0) -
.teamcity/src/main/kotlin/promotion/BasePublishGradleDistribution.kt
**/build/website-checkout/data/releases.xml **/build/git-checkout/build/reports/integTest/** => distribution-tests **/smoke-tests/build/reports/tests/** => post-smoke-tests **/build/version-info.properties => version-info.properties """.trimIndent() dependencies {
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Feb 07 17:05:02 UTC 2024 - 3.1K bytes - Viewed (0) -
docs_src/extra_models/tutorial001.py
hashed_password = fake_password_hasher(user_in.password) user_in_db = UserInDB(**user_in.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)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 943 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial004.py
app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 717 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial005_py39.py
app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post( "/items/", response_model=Item, summary="Create an item", response_description="The created item", ) async def create_item(item: Item): """ Create an item with all the information:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 736 bytes - Viewed (0) -
src/packaging/common/scripts/postinst
${packaging.scripts.header} # # This script is executed in the post-installation phase # # On Debian, # $1=configure : is set to 'configure' and if $2 is set, it is an upgrade # # On RedHat, # $1=0 : indicates a removal # $1=1 : indicates an upgrade # Sets the default values for fess variables used in this script FESS_USER="${packaging.fess.user}" FESS_GROUP="${packaging.fess.group}"
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Dec 10 01:24:02 UTC 2015 - 3.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/request-forms.md
表单数据的「媒体类型」编码一般为 `application/x-www-form-urlencoded`。 但包含文件的表单编码为 `multipart/form-data`。文件处理详见下节。 编码和表单字段详见 <a href="https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> Web 文档的 <code>POST</code></a>小节。 /// /// warning | "警告" 可在一个*路径操作*中声明多个 `Form` 参数,但不能同时声明要接收 JSON 的 `Body` 字段。因为此时请求体的编码是 `application/x-www-form-urlencoded`,不是 `application/json`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0)