- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 134 for Routes (0.27 sec)
-
tests/test_extra_routes.py
app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None @app.api_route("/items/{item_id}", methods=["GET"]) def get_items(item_id: str): return {"item_id": item_id} def get_not_decorated(item_id: str): return {"item_id": item_id} app.add_api_route("/items-not-decorated/{item_id}", get_not_decorated) @app.delete("/items/{item_id}")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 13.7K bytes - Viewed (0) -
fastapi/openapi/utils.py
responses_from_routes.append(route.response_field) if route.response_fields: responses_from_routes.extend(route.response_fields.values()) if route.callbacks: callback_flat_models.extend(get_fields_from_routes(route.callbacks)) params = get_flat_params(route.dependant) request_fields_from_routes.extend(params)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
tests/test_custom_route_class.py
@router_b.get("/") def get_b(): return {"msg": "B"} @router_c.get("/") def get_c(): return {"msg": "C"} router_b.include_router(router=router_c, prefix="/c") router_a.include_router(router=router_b, prefix="/b") app.include_router(router=router_a, prefix="/a") client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.1K bytes - Viewed (0) -
docs/em/docs/advanced/behind-a-proxy.md
[entryPoints] [entryPoints.http] address = ":9999" [providers] [providers.file] filename = "routes.toml" ``` ๐ ๐ฌ Traefik ๐ ๐ โด 9๏ธโฃ9๏ธโฃ9๏ธโฃ9๏ธโฃ & โ๏ธ โ1๏ธโฃ ๐ `routes.toml`. !!! tip ๐ฅ โ๏ธ โด 9๏ธโฃ9๏ธโฃ9๏ธโฃ9๏ธโฃ โฉ๏ธ ๐ฉ ๐บ๐ธ๐ โด 8๏ธโฃ0๏ธโฃ ๐ ๐ ๐ซ โ๏ธ ๐ โซ๏ธ โฎ๏ธ ๐ก (`sudo`) ๐. ๐ โ ๐ ๐ ๐ `routes.toml`: ```TOML hl_lines="5 12 20" [http] [http.middlewares]
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10.1K bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial002.py
return [{"item_id": "Foo"}] def use_route_names_as_operation_ids(app: FastAPI) -> None: """ Simplify operation IDs so that generated API clients have simpler function names. Should be called only after all routes have been added. """ for route in app.routes: if isinstance(route, APIRoute): route.operation_id = route.name # in this case, 'read_items'
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 572 bytes - Viewed (0) -
docs/en/docs/how-to/extending-openapi.md
* `summary`: A short summary of the API. * `description`: The description of your API, this can include markdown and will be shown in the docs. * `routes`: A list of routes, these are each of the registered *path operations*. They are taken from `app.routes`. !!! info The parameter `summary` is available in OpenAPI 3.1.0 and above, supported by FastAPI 0.99.0 and above. ## Overriding the defaults
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 3.2K bytes - Viewed (0) -
docs_src/extending_openapi/tutorial001.py
title="Custom title", version="2.5.0", summary="This is a very custom OpenAPI schema", description="Here's a longer description of the custom **OpenAPI** schema", routes=app.routes, ) openapi_schema["info"]["x-logo"] = { "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" } app.openapi_schema = openapi_schema return app.openapi_schema
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 737 bytes - Viewed (0) -
docs/en/docs/advanced/openapi-callbacks.md
{!../../../docs_src/openapi_callbacks/tutorial001.py!} ``` !!! tip Notice that you are not passing the router itself (`invoices_callback_router`) to `callback=`, but the attribute `.routes`, as in `invoices_callback_router.routes`. ### Check the docs Now you can start your app with Uvicorn and go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.7K bytes - Viewed (0) -
docs/de/docs/advanced/openapi-callbacks.md
```Python hl_lines="35" {!../../../docs_src/openapi_callbacks/tutorial001.py!} ``` !!! tip "Tipp" Beachten Sie, dass Sie nicht den Router selbst (`invoices_callback_router`) an `callback=` รผbergeben, sondern das Attribut `.routes`, wie in `invoices_callback_router.routes`. ### Es in der Dokumentation ansehen
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 20:17:23 GMT 2024 - 8.8K bytes - Viewed (0) -
tests/test_sub_callbacks.py
(e.g. "payment successful"). """ # Send the invoice, collect the money, send the notification (the callback) return {"msg": "Invoice received"} app.include_router(subrouter, callbacks=events_callback_router.routes) client = TestClient(app) def test_get(): response = client.post( "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3} )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 13.8K bytes - Viewed (0)