- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 108 for url (0.32 sec)
-
docs_src/body_nested_models/tutorial004_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Image(BaseModel): url: str name: str class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() image: Image | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Wed May 11 17:29:02 GMT 2022 - 455 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial005_py310.py
from fastapi import FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Image(BaseModel): url: HttpUrl name: str class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() image: Image | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 468 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial007.py
from typing import List, Set, Union from fastapi import FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Image(BaseModel): url: HttpUrl name: str class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() images: Union[List[Image], None] = None class Offer(BaseModel):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 581 bytes - Viewed (0) -
docs_src/openapi_webhooks/tutorial001.py
start_date: datetime @app.webhooks.post("new-subscription") def new_subscription(body: Subscription): """ When a new user subscribes to your service we'll send you a POST request with this data to the URL that you register for the event `new-subscription` in the dashboard. """ @app.get("/users/") def read_users():
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Oct 20 09:00:44 GMT 2023 - 550 bytes - Viewed (0) -
docs_src/metadata/tutorial003.py
from fastapi import FastAPI app = FastAPI(docs_url="/documentation", redoc_url=None) @app.get("/items/") async def read_items():
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 02 04:55:20 GMT 2020 - 161 bytes - Viewed (0) -
docs_src/metadata/tutorial004.py
}, { "name": "items", "description": "Manage items. So _fancy_ they have their own docs.", "externalDocs": { "description": "Items external docs", "url": "https://fastapi.tiangolo.com/", }, }, ] app = FastAPI(openapi_tags=tags_metadata) @app.get("/users/", tags=["users"]) async def get_users(): return [{"name": "Harry"}, {"name": "Ron"}]
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Jun 13 11:58:06 GMT 2020 - 693 bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial003.py
from fastapi import FastAPI, Request app = FastAPI( servers=[ {"url": "https://stag.example.com", "description": "Staging environment"}, {"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", ) @app.get("/app") def read_main(request: Request):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 10 17:28:18 GMT 2020 - 405 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py310.py
"description": None, "price": 50.2, "tax": 10.5, "tags": [], }, ), ], ) def test_get(url, data, client: TestClient): response = client.get(url) assert response.status_code == 200, response.text assert response.json() == data @needs_py310 def test_openapi_schema(client: TestClient):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Aug 04 20:47:07 GMT 2023 - 5.2K bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial004.py
from fastapi import FastAPI, Request app = FastAPI( servers=[ {"url": "https://stag.example.com", "description": "Staging environment"}, {"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", root_path_in_servers=False, ) @app.get("/app") def read_main(request: Request):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 10 17:28:18 GMT 2020 - 437 bytes - Viewed (0) -
fastapi/applications.py
openapi_url = root_path + self.openapi_url oauth2_redirect_url = self.swagger_ui_oauth2_redirect_url if oauth2_redirect_url: oauth2_redirect_url = root_path + oauth2_redirect_url return get_swagger_ui_html( openapi_url=openapi_url, title=f"{self.title} - Swagger UI",
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0)