- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 4,280 for From (0.04 sec)
-
docs_src/response_directly/tutorial001.py
from datetime import datetime from typing import Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from fastapi.responses import JSONResponse from pydantic import BaseModel class Item(BaseModel): title: str timestamp: datetime description: Union[str, None] = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 505 bytes - Viewed (0) -
tests/test_union_body.py
from typing import Optional, Union from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: Optional[str] = None class OtherItem(BaseModel): price: int @app.post("/items/") def save_union_body(item: Union[OtherItem, Item]): return {"item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.6K bytes - Viewed (0) -
LICENSE
and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 33.7K bytes - Viewed (0) -
compat/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
class ProjectInheritanceTest extends AbstractProjectInheritanceTestCase { // ---------------------------------------------------------------------- // // p4 inherits from p3 // p3 inherits from p2 // p2 inherits from p1 // p1 inherits from p0 // p0 inherits from super model // // or we can show it graphically as: // // p4 ---> p3 ---> p2 ---> p1 ---> p0 --> super model //
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 6.2K bytes - Viewed (0) -
docs_src/security/tutorial004_an.py
from datetime import datetime, timedelta, timezone from typing import Union import jwt from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from jwt.exceptions import InvalidTokenError from passlib.context import CryptContext from pydantic import BaseModel from typing_extensions import Annotated # to get a string like this run: # openssl rand -hex 32
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
.teamcity/src/test/kotlin/PromotionProjectTests.kt
assertEquals( listOf("SanityCheck", "Nightly Snapshot", "Nightly Snapshot (from QuickFeedback)", "Nightly Snapshot (from QuickFeedback) - Check Ready", "Nightly Snapshot (from QuickFeedback) - Upload", "Nightly Snapshot (from QuickFeedback) - Promote", "Publish Branch Snapshot (from Quick Feedback)", "Release - Milestone", "Start Release Cycle", "Start Release Cycle Test"), model.buildTypes.map { it.name }
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Tue Feb 13 14:18:23 UTC 2024 - 13.4K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
import uuid import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel from .utils import needs_pydanticv1, needs_pydanticv2 class MyUuid: def __init__(self, uuid_string: str): self.uuid = uuid_string def __str__(self): return self.uuid @property # type: ignore def __class__(self): return uuid.UUID @property
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_custom_schema_fields.py
from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str if PYDANTIC_V2: model_config = { "json_schema_extra": { "x-something-internal": {"level": 4}, } } else: class Config: schema_extra = {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
docs_src/body_updates/tutorial002_py39.py
from typing import Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: Union[str, None] = None description: Union[str, None] = None price: Union[float, None] = None tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1K bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial005_an.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Annotated[ Item, Body(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 26 18:03:13 UTC 2023 - 1.5K bytes - Viewed (0)