- Sort Score
- Result 10 results
- Languages All
Results 881 - 890 of 1,086 for str (0.03 sec)
-
docs_src/dependencies/tutorial003_py310.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)): response = {} if commons.q:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 603 bytes - Viewed (0) -
docs/he/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 21.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/response-model.md
```Python hl_lines="11 13-14" {!> ../../docs_src/response_model/tutorial004.py!} ``` //// * `description: Union[str, None] = None` (или `str | None = None` в Python 3.10), где `None` является значением по умолчанию. * `tax: float = 10.5`, где `10.5` является значением по умолчанию. * `tags: List[str] = []`, где пустой список `[]` является значением по умолчанию.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 30.4K bytes - Viewed (0) -
docs/de/docs/tutorial/body-updates.md
Sie können den `jsonable_encoder` verwenden, um die empfangenen Daten in etwas zu konvertieren, das als JSON gespeichert werden kann (in z. B. einer NoSQL-Datenbank). Zum Beispiel, um ein `datetime` in einen `str` zu konvertieren. //// tab | Python 3.10+ ```Python hl_lines="28-33" {!> ../../docs_src/body_updates/tutorial001_py310.py!} ``` //// //// tab | Python 3.9+ ```Python hl_lines="30-35"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.4K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-multiple-params.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params.md
```Python hl_lines="6-7" {!../../docs_src/query_params/tutorial005.py!} ``` Here the query parameter `needy` is a required query parameter of type `str`. If you open in your browser a URL like: ``` http://127.0.0.1:8000/items/foo-item ``` ...without adding the required parameter `needy`, you will see an error like: ```JSON {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.1K bytes - Viewed (0) -
docs/nl/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 21.2K bytes - Viewed (0) -
docs_src/security/tutorial007_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/fr/docs/tutorial/path-params-numeric-validations.md
/// tip Ce n'est probablement pas aussi important ou nécessaire si vous utilisez `Annotated`. /// Disons que vous voulez déclarer le paramètre de requête `q` comme un `str` requis. Et vous n'avez pas besoin de déclarer autre chose pour ce paramètre, donc vous n'avez pas vraiment besoin d'utiliser `Query`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:32:37 UTC 2024 - 6.9K bytes - Viewed (0) -
docs/em/docs/advanced/settings.md
, 🔢 🔛 ⚫️ 🔜 🛠️ 🕐 🔠 🌀 ❌. & ⤴️ 💲 📨 🔠 👈 🌀 ❌ 🔜 ⚙️ 🔄 & 🔄 🕐❔ 🔢 🤙 ⏮️ ⚫️❔ 🎏 🌀 ❌. 🖼, 🚥 👆 ✔️ 🔢: ```Python @lru_cache def say_hi(name: str, salutation: str = "Ms."): return f"Hello {salutation} {name}" ``` 👆 📋 💪 🛠️ 💖 👉: ```mermaid sequenceDiagram participant code as Code participant function as say_hi()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.3K bytes - Viewed (0)