- Sort Score
- Result 10 results
- Languages All
Results 691 - 700 of 1,977 for Fastapi (0.1 sec)
-
docs_src/body_multiple_params/tutorial004_py310.py
from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None class User(BaseModel): username: str full_name: str | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 10 18:49:18 UTC 2023 - 603 bytes - Viewed (0) -
docs_src/dependencies/tutorial004.py
from typing import Union 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: Union[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: CommonQueryParams = Depends()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 639 bytes - Viewed (0) -
docs_src/response_model/tutorial004_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 627 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney ๐ฑ") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 660 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001_an.py
from datetime import datetime, time, timedelta from typing import Union from uuid import UUID from fastapi import Body, FastAPI from typing_extensions import Annotated app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()],
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 830 bytes - Viewed (0) -
tests/test_security_http_basic_optional.py
from base64 import b64encode from typing import Optional from fastapi import FastAPI, Security from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.testclient import TestClient app = FastAPI() security = HTTPBasic(auto_error=False) @app.get("/users/me") def read_current_user(credentials: Optional[HTTPBasicCredentials] = Security(security)): if credentials is None:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.6K bytes - Viewed (0) -
tests/test_forms_single_model.py
from typing import List, Optional from dirty_equals import IsDict from fastapi import FastAPI, Form from fastapi.testclient import TestClient from pydantic import BaseModel, Field from typing_extensions import Annotated app = FastAPI() class FormModel(BaseModel): username: str lastname: str age: Optional[int] = None tags: List[str] = ["foo", "bar"] alias_with: str = Field(alias="with", default="nothing")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 13 09:51:00 UTC 2024 - 3.5K bytes - Viewed (0) -
docs/em/docs/advanced/path-operation-advanced-configuration.md
& ๐ ๐ช ๐ ๐ฅ ๐ฝ ๐ ๐จ ๐ซ ๐ป. ๐ผ, ๐ ๐ธ ๐ฅ ๐ซ โ๏ธ FastAPI ๐ ๏ธ ๐ ๏ธ โ ๐ป ๐ โช๏ธโก๏ธ Pydantic ๐ท ๐ซ ๐ง ๐ฌ ๐ป. ๐, ๐ฅ ๐ฃ ๐จ ๐ ๐ ๐, ๐ซ ๐ป: ```Python hl_lines="17-22 24" {!../../docs_src/path_operation_advanced_configuration/tutorial007.py!} ``` ๐, ๐ ๐ฅ ๐ซ โ๏ธ ๐ข ๐ ๏ธ ๐ ๏ธ, ๐ฅ โ๏ธ Pydantic ๐ท โ ๐ ๐ป ๐ ๐ฝ ๐ ๐ฅ ๐ ๐จ ๐. โคด๏ธ ๐ฅ โ๏ธ ๐จ ๐, & โ ๐ช `bytes`. ๐ โ ๐ FastAPI ๐ ๐ซ ๐ ๐ป ๐จ ๐ ๐ป.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.7K bytes - Viewed (0) -
.github/ISSUE_TEMPLATE/privileged.yml
body: - type: markdown attributes: value: | Thanks for your interest in FastAPI! ๐ If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions) instead. - type: checkboxes id: privileged attributes: label: Privileged issue
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 29 23:35:07 UTC 2024 - 888 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):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 581 bytes - Viewed (0)