- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 365 for id (0.12 sec)
-
fastapi/security/open_id_connect_url.py
Aleksei Kotenko <******@****.***> 1712026131 +0100
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 2.7K bytes - Viewed (0) -
docs_src/app_testing/app_b/main.py
fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: str = Header()):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:44:08 GMT 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
expected_response.update( { "start_process": "2018-12-22T14:05:00+00:00", "duration": 176_100, "item_id": item_id, } ) response = client.put(f"/items/{item_id}", json=data) assert response.status_code == 200, response.text assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 6.8K bytes - Viewed (0) -
docs_src/websockets/tutorial002_an_py310.py
<form action="" onsubmit="sendMessage(event)"> <label>Item ID: <input type="text" id="itemId" autocomplete="off" value="foo"/></label> <label>Token: <input type="text" id="token" autocomplete="off" value="some-key-token"/></label> <button onclick="connect(event)">Connect</button> <hr> <label>Message: <input type="text" id="messageText" autocomplete="off"/></label> <button>Send</button>
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.8K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 4.5K bytes - Viewed (0) -
fastapi/utils.py
return operation_id def generate_unique_id(route: "APIRoute") -> str: operation_id = f"{route.name}{route.path_format}" operation_id = re.sub(r"\W", "_", operation_id) assert route.methods operation_id = f"{operation_id}_{list(route.methods)[0].lower()}" return operation_id def deep_dict_update(main_dict: Dict[Any, Any], update_dict: Dict[Any, Any]) -> None:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
docs_src/body_updates/tutorial001_py39.py
} @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.put("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): update_item_encoded = jsonable_encoder(item) items[item_id] = update_item_encoded
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 900 bytes - Viewed (0) -
docs_src/response_model/tutorial006.py
}, } @app.get( "/items/{item_id}/name", response_model=Item, response_model_include=["name", "description"], ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude=["tax"]) async def read_item_public_data(item_id: str):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 848 bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/crud.py
from sqlalchemy.orm import Session from . import models, schemas def get_user(db: Session, user_id: int): return db.query(models.User).filter(models.User.id == user_id).first() def get_user_by_email(db: Session, email: str): return db.query(models.User).filter(models.User.email == email).first() def get_users(db: Session, skip: int = 0, limit: int = 100): return db.query(models.User).offset(skip).limit(limit).all()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1K bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial002.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 265 bytes - Viewed (0)