- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for Patrick (0.04 sec)
-
docs_src/graphql_/tutorial001_py39.py
@strawberry.type class User: name: str age: int @strawberry.type class Query: @strawberry.field def user(self) -> User: return User(name="Patrick", age=100) schema = strawberry.Schema(query=Query) graphql_app = GraphQLRouter(schema) app = FastAPI()Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 424 bytes - Viewed (0) -
tests/test_tutorial/test_graphql/test_tutorial001.py
def test_query(client: TestClient): response = client.post("/graphql", json={"query": "{ user { name, age } }"}) assert response.status_code == 200 assert response.json() == {"data": {"user": {"name": "Patrick", "age": 100}}} def test_openapi(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == { "info": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
## Order the parameters as you need, tricks { #order-the-parameters-as-you-need-tricks } /// tip This is probably not as important or necessary if you use `Annotated`. /// Here's a **small trick** that can be handy, but you won't need it often. If you want to: * declare the `q` query parameter without a `Query` nor any default value * declare the path parameter `item_id` using `Path`Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.1K bytes - Viewed (0) -
docs/de/docs/advanced/dataclasses.md
Bedenken Sie, dass Datenklassen nicht alles können, was Pydantic-Modelle können. Daher müssen Sie möglicherweise weiterhin Pydantic-Modelle verwenden. Wenn Sie jedoch eine Menge Datenklassen herumliegen haben, ist dies ein guter Trick, um sie für eine Web-API mithilfe von FastAPI zu verwenden. 🤓 /// ## Datenklassen in `response_model` { #dataclasses-in-response-model } Sie können `dataclasses` auch im Parameter `response_model` verwenden:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
/// info Keep in mind that dataclasses can't do everything Pydantic models can do. So, you might still need to use Pydantic models. But if you have a bunch of dataclasses laying around, this is a nice trick to use them to power a web API using FastAPI. 🤓 /// ## Dataclasses in `response_model` { #dataclasses-in-response-model } You can also use `dataclasses` in the `response_model` parameter:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.2K bytes - Viewed (0) -
docs/de/docs/tutorial/path-params-numeric-validations.md
/// tip | Tipp Das ist wahrscheinlich nicht so wichtig oder notwendig, wenn Sie `Annotated` verwenden. /// Hier ist ein **kleiner Trick**, der nützlich sein kann, obwohl Sie ihn nicht oft benötigen werden. Wenn Sie: * den `q`-Query-Parameter sowohl ohne `Query` als auch ohne Defaultwert deklarieren * den Pfad-Parameter `item_id` mit `Path` deklarieren
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.1K bytes - Viewed (0) -
docs/en/docs/advanced/path-operation-advanced-configuration.md
Nevertheless, we can declare the expected schema for the request body. ### Custom OpenAPI content type { #custom-openapi-content-type } Using this same trick, you could use a Pydantic model to define the JSON Schema that is then included in the custom OpenAPI schema section for the *path operation*. And you could do this even if the data type in the request is not JSON.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 7.2K bytes - Viewed (0) -
docs/de/docs/advanced/path-operation-advanced-configuration.md
Dennoch können wir das zu erwartende Schema für den Requestbody deklarieren. ### Benutzerdefinierter OpenAPI-Content-Type { #custom-openapi-content-type } Mit demselben Trick könnten Sie ein Pydantic-Modell verwenden, um das JSON-Schema zu definieren, das dann im benutzerdefinierten Abschnitt des OpenAPI-Schemas für die *Pfadoperation* enthalten ist.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 8.3K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
And in the code, we get a `dict` with all the data sent by the client, **only the data sent by the client**, excluding any values that would be there just for being the default values. To do it we use `exclude_unset=True`. This is the main trick. 🪄 Then we use `hero_db.sqlmodel_update(hero_data)` to update the `hero_db` with the data from `hero_data`. {* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[83:93] hl[83:84,88:89] *}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 02 05:06:56 UTC 2025 - 15.8K bytes - Viewed (0) -
docs/de/docs/deployment/docker.md
```Dockerfile CMD ["fastapi", "run", "app/main.py", "--proxy-headers", "--port", "80"] ``` #### Docker-Cache { #docker-cache } In diesem `Dockerfile` gibt es einen wichtigen Trick: Wir kopieren zuerst die **Datei nur mit den Abhängigkeiten**, nicht den Rest des Codes. Lassen Sie mich Ihnen erklären, warum. ```Dockerfile COPY ./requirements.txt /code/requirements.txt ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 02 17:32:56 UTC 2025 - 33.6K bytes - Viewed (0)