Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 838 for Person (0.04 seconds)

  1. tests/test_read_with_orm_mode.py

            full_name: str
    
            model_config = {"from_attributes": True}
    
        app = FastAPI()
    
        @app.post("/people/", response_model=PersonRead)
        def create_person(person: PersonCreate) -> Any:
            db_person = Person.model_validate(person)
            return db_person
    
        client = TestClient(app)
    
        person_data = {"name": "Dive", "lastname": "Wilson"}
        response = client.post("/people/", json=person_data)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  2. tests/test_jsonable_encoder.py

    from pydantic import BaseModel, Field, ValidationError
    
    
    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    class Pet:
        def __init__(self, owner: Person, name: str):
            self.owner = owner
            self.name = name
    
    
    @dataclass
    class Item:
        name: str
        count: int
    
    
    class DictablePerson(Person):
        def __iter__(self):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 9.2K bytes
    - Click Count (0)
  3. tests/test_tutorial/test_python_types/test_tutorial010.py

    from docs_src.python_types.tutorial010_py39 import Person, get_person_name
    
    
    def test_get_person_name():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 166 bytes
    - Click Count (0)
  4. docs_src/python_types/tutorial010_py39.py

    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    def get_person_name(one_person: Person):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 144 bytes
    - Click Count (0)
  5. docs/en/docs/python-types.md

    ////
    
    ### Classes as types { #classes-as-types }
    
    You can also declare a class as the type of a variable.
    
    Let's say you have a class `Person`, with a name:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[1:3] *}
    
    Then you can declare a variable to be of type `Person`:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[6] *}
    
    And then, again, you get all the editor support:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 15.6K bytes
    - Click Count (0)
  6. docs/ru/docs/python-types.md

    ////
    
    ### Классы как типы { #classes-as-types }
    
    Вы также можете объявлять класс как тип переменной.
    
    Допустим, у вас есть класс `Person` с именем:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[1:3] *}
    
    Тогда вы можете объявить переменную типа `Person`:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[6] *}
    
    И снова вы получите полную поддержку редактора кода:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 24.4K bytes
    - Click Count (0)
  7. docs/en/docs/tutorial/metadata.md

    | `summary` | `str` | A short summary of the API. <small>Available since OpenAPI 3.1.0, FastAPI 0.99.0.</small> |
    | `description` | `str` | A short description of the API. It can use Markdown. |
    | `version` | `string` | The version of the API. This is the version of your own application, not of OpenAPI. For example `2.5.0`. |
    | `terms_of_service` | `str` | A URL to the Terms of Service for the API. If provided, this has to be a URL. |
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 5.9K bytes
    - Click Count (0)
  8. docs/de/docs/python-types.md

    ### Klassen als Typen { #classes-as-types }
    
    Sie können auch eine Klasse als Typ einer Variablen deklarieren.
    
    Nehmen wir an, Sie haben eine Klasse `Person`, mit einem Namen:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[1:3] *}
    
    Dann können Sie eine Variable vom Typ `Person` deklarieren:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[6] *}
    
    Und wiederum bekommen Sie die volle Editor-Unterstützung:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 17.9K bytes
    - Click Count (1)
  9. docs/es/docs/python-types.md

    ### Clases como tipos { #classes-as-types }
    
    También puedes declarar una clase como el tipo de una variable.
    
    Digamos que tienes una clase `Person`, con un nombre:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[1:3] *}
    
    Luego puedes declarar una variable para que sea de tipo `Person`:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[6] *}
    
    Y luego, nuevamente, obtienes todo el soporte del editor:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 16.4K bytes
    - Click Count (1)
  10. docs/pt/docs/python-types.md

    ### Classes como tipos { #classes-as-types }
    
    Você também pode declarar uma classe como o tipo de uma variável.
    
    Digamos que você tenha uma classe `Person`, com um nome:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[1:3] *}
    
    Então você pode declarar que uma variável é do tipo `Person`:
    
    {* ../../docs_src/python_types/tutorial010_py39.py hl[6] *}
    
    E então, novamente, você recebe todo o apoio do editor:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 16.7K bytes
    - Click Count (0)
Back to Top