- Sort Score
- Result 10 results
- Languages All
Results 4251 - 4260 of 7,602 for _class (0.04 sec)
-
docs_src/dependencies/tutorial011_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 544 bytes - Viewed (0) -
docs_src/encoder/tutorial001.py
from datetime import datetime from typing import Union from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import BaseModel fake_db = {} 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): json_compatible_item_data = jsonable_encoder(item)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 461 bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
import org.checkerframework.checker.nullness.qual.Nullable; /** * This class contains static utility methods that operate on or return objects of type {@link * Iterator}. Except as noted, each method has a corresponding {@link Iterable}-based method in the * {@link Iterables} class. * * <p><i>Performance notes:</i> Unless otherwise noted, all of the iterators produced in this class
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 50.3K bytes - Viewed (0) -
docs_src/body_nested_models/tutorial003.py
from typing import Set, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 414 bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_an.py
from typing import List, Union from fastapi import FastAPI, Header from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class CommonHeaders(BaseModel): model_config = {"extra": "forbid"} host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: List[str] = [] @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 486 bytes - Viewed (0) -
docs_src/python_types/tutorial011_py310.py
from datetime import datetime from pydantic import BaseModel class User(BaseModel): id: int name: str = "John Doe" signup_ts: datetime | None = None friends: list[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 461 bytes - Viewed (0) -
docs_src/query_param_models/tutorial001_an_py39.py
from fastapi import FastAPI, Query from pydantic import BaseModel, Field from typing_extensions import Annotated, Literal app = FastAPI() class FilterParams(BaseModel): limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 453 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_py39.py
from fastapi import FastAPI, Query from pydantic import BaseModel, Field from typing_extensions import Literal app = FastAPI() class FilterParams(BaseModel): model_config = {"extra": "forbid"} limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 472 bytes - Viewed (0) -
src/test/java/org/codelibs/fess/test/net/protocol/xxx5/TestHandler.java
* either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.codelibs.fess.test.net.protocol.xxx5; public class TestHandler {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Tue Jun 18 00:44:11 UTC 2024 - 702 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial004.py
from typing import Set, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 717 bytes - Viewed (0)