- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 679 for typings (0.2 sec)
-
tests/test_typing_python39.py
from fastapi import FastAPI from fastapi.testclient import TestClient from .utils import needs_py310 @needs_py310 def test_typing(): types = { list[int]: [1, 2, 3], dict[str, list[int]]: {"a": [1, 2, 3], "b": [4, 5, 6]}, set[int]: [1, 2, 3], # `set` is converted to `list` tuple[int, ...]: [1, 2, 3], # `tuple` is converted to `list` } for test_type, expect in types.items():
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 709 bytes - Viewed (0) -
docs/en/docs/python-types.md
To declare those types and the internal types, you can use the standard Python module `typing`. It exists specifically to support these type hints. #### Newer versions of Python The syntax using `typing` is **compatible** with all versions, from Python 3.6 to the latest ones, including Python 3.9, Python 3.10, etc.
Plain Text - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 17K bytes - Viewed (0) -
docs/en/docs/alternatives.md
### <a href="https://flask.palletsprojects.com" class="external-link" target="_blank">Flask</a> Flask is a "microframework", it doesn't include database integrations nor many of the things that come by default in Django. This simplicity and flexibility allow doing things like using NoSQL databases as the main data storage system. As it is very simple, it's relatively intuitive to learn, although the documentation gets somewhat technical at some points.
Plain Text - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 23.2K bytes - Viewed (0) -
tests/test_forms_from_non_typing_sequences.py
Sebastián RamÃrez <******@****.***> 1652485102 -0500
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 1.2K bytes - Viewed (0) -
docs_src/header_params/tutorial001_an.py
from typing import Union from fastapi import FastAPI, Header from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[Union[str, None], Header()] = None):
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 259 bytes - Viewed (0) -
docs_src/cookie_params/tutorial001_an.py
from typing import Union from fastapi import Cookie, FastAPI from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(ads_id: Annotated[Union[str, None], Cookie()] = None):
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 247 bytes - Viewed (0) -
docs_src/header_params/tutorial003_an.py
from typing import List, Union from fastapi import FastAPI, Header from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 269 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006c_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[str, None], Query(min_length=3)] = ...): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 349 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial007_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[Union[str, None], Query(title="Query string", min_length=3)] = None ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 378 bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an.py
from typing import Union from fastapi import Cookie, Depends, FastAPI from typing_extensions import Annotated app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[Union[str, None], Cookie()] = None, ): if not q: return last_query return q @app.get("/items/")
Python - Registered: Sun Mar 24 07:19:08 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 557 bytes - Viewed (0)