- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 60 for V2 (0.25 sec)
-
docs/en/docs/img/sponsors/talkpython-v2.jpg
talkpython-v2.jpg...
JPEG Image - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Jan 30 14:24:35 GMT 2024 - 9.5K 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 = {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
# TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_get_user(client): response = client.get("/users/1") assert response.status_code == 200, response.text data = response.json() assert "email" in data assert "id" in data # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_nonexistent_user(client):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
docs/en/docs/tutorial/body-updates.md
!!! info In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`. The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2. That would generate a `dict` with only the data that was set when creating the `item` model, excluding default values.
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.6K bytes - Viewed (0) -
.github/workflows/test.yml
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt', 'requirements-docs-tests.txt') }}-test-v08 - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: pip install -r requirements-tests.txt - name: Install Pydantic v2 run: pip install "pydantic>=2.0.2,<3.0.0" - name: Lint
Others - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 4.4K bytes - Viewed (1) -
tests/test_tutorial/test_sql_databases/test_testing_databases.py
import importlib import os from pathlib import Path import pytest from ...utils import needs_pydanticv1 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_testing_dbs(tmp_path_factory: pytest.TempPathFactory): tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./test.db") if test_db.is_file(): # pragma: nocover test_db.unlink()
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 788 bytes - Viewed (0) -
fastapi/datastructures.py
from typing import ( Any, BinaryIO, Callable, Dict, Iterable, Optional, Type, TypeVar, cast, ) from fastapi._compat import ( PYDANTIC_V2, CoreSchema, GetJsonSchemaHandler, JsonSchemaValue, with_info_plain_validator_function, ) from starlette.datastructures import URL as URL # noqa: F401 from starlette.datastructures import Address as Address # noqa: F401
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 5.6K bytes - Viewed (0) -
docs_src/wsgi/tutorial001.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue May 09 14:32:00 GMT 2023 - 443 bytes - Viewed (0) -
fastapi/params.py
from fastapi.openapi.models import Example from pydantic.fields import FieldInfo from typing_extensions import Annotated, deprecated from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined _Unset: Any = Undefined class ParamTypes(Enum): query = "query" header = "header" path = "path" cookie = "cookie" class Param(FieldInfo):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 27.5K bytes - Viewed (1) -
docs/de/docs/advanced/wsgi.md
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:17:05 GMT 2024 - 1.2K bytes - Viewed (0)