- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for V2 (0.2 sec)
-
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 May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 27.5K bytes - Viewed (1) -
fastapi/utils.py
""" class_validators = class_validators or {} if PYDANTIC_V2: field_info = field_info or FieldInfo( annotation=type_, default=default, alias=alias ) else: field_info = field_info or FieldInfo() kwargs = {"name": name, "field_info": field_info} if PYDANTIC_V2: kwargs.update({"mode": mode}) else: kwargs.update( {
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
tests/test_additional_properties_bool.py
from typing import Union from dirty_equals import IsDict from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict class FooBaseModel(BaseModel): if PYDANTIC_V2: model_config = ConfigDict(extra="forbid") else: class Config: extra = "forbid" class Foo(FooBaseModel): pass
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases.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 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.1K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
@needs_py310 # 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 @needs_py310 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_nonexistent_user(client):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tensorflow/api_template.__init__.py
if _tf_uses_legacy_keras: _module_dir = _module_util.get_parent_dir_for_name("tf_keras.api._v2.keras") else: _module_dir = _module_util.get_parent_dir_for_name("keras.api._v2.keras") _current_module.__path__ = [_module_dir] + _current_module.__path__ # Enable TF2 behaviors from tensorflow.python.compat import v2_compat as _compat _compat.enable_v2_behavior() _major_api_version = 2
Python - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Mar 05 06:27:59 GMT 2024 - 6.7K bytes - Viewed (3) -
tests/test_response_by_alias.py
from typing import List from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict, Field app = FastAPI() class Model(BaseModel): name: str = Field(alias="alias") class ModelNoAlias(BaseModel): name: str if PYDANTIC_V2: model_config = ConfigDict( json_schema_extra={
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 11.1K bytes - Viewed (0) -
tests/test_compat.py
class_validators={}, model_config=BaseConfig, ) assert not is_pv1_scalar_field(field) @needs_pydanticv2 def test_get_model_config(): # For coverage in Pydantic v2 class Foo(BaseModel): model_config = ConfigDict(from_attributes=True) foo = Foo() config = _get_model_config(foo) assert config == {"from_attributes": True} def test_complex():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 2.8K bytes - Viewed (0) -
fastapi/param_functions.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict def create_app(): app = FastAPI() class Item(BaseModel): data: str if PYDANTIC_V2: model_config = ConfigDict( json_schema_extra={"example": {"data": "Data in schema_extra"}}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 37.7K bytes - Viewed (0)