Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 89 for person (0.04 seconds)

  1. 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 Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.2K bytes
    - Click Count (0)
  2. 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 Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  3. docs_src/python_types/tutorial010_py310.py

    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    def get_person_name(one_person: Person):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 144 bytes
    - Click Count (0)
  4. 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_py310.py hl[1:3] *}
    
    Then you can declare a variable to be of type `Person`:
    
    {* ../../docs_src/python_types/tutorial010_py310.py hl[6] *}
    
    And then, again, you get all the editor support:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 11K bytes
    - Click Count (0)
  5. LICENSES/vendor/github.com/Masterminds/semver/v3/LICENSE

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    Created: Fri Apr 03 09:05:14 GMT 2026
    - Last Modified: Sat Nov 01 08:52:09 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  6. schema/relationship_test.go

    				{"ID", "Person", "PersonID", "likes", "", true},
    				{"ID", "Thing", "ThingID", "likes", "", false},
    			},
    		},
    		Relation{
    			Name: "Dislikes", Type: schema.Many2Many, Schema: "Person", FieldSchema: "Thing",
    			JoinTable: JoinTable{Name: "dislikes", Table: "dislikes"},
    			References: []Reference{
    				{"ID", "Person", "PersonID", "dislikes", "", true},
    				{"ID", "Thing", "ThingID", "dislikes", "", false},
    			},
    		},
    	)
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Aug 18 11:44:52 GMT 2025
    - 26.5K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/python-types.md

    你也可以用類別來宣告變數的型別。
    
    假設你有一個 `Person` 類別,帶有名稱:
    
    {* ../../docs_src/python_types/tutorial010_py310.py hl[1:3] *}
    
    接著你可以宣告一個變數為 `Person` 型別:
    
    {* ../../docs_src/python_types/tutorial010_py310.py hl[6] *}
    
    然後,你一樣會得到完整的編輯器支援:
    
    <img src="/img/python-types/image06.png">
    
    請注意,這表示「`one_person` 是類別 `Person` 的『實例(instance)』」。
    
    並不是「`one_person` 就是名為 `Person` 的『類別(class)』」。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.7K bytes
    - Click Count (0)
  8. docs/zh/docs/python-types.md

    你也可以把类声明为变量的类型。
    
    假设你有一个名为 `Person` 的类,带有 name:
    
    {* ../../docs_src/python_types/tutorial010_py310.py hl[1:3] *}
    
    然后你可以声明一个变量是 `Person` 类型:
    
    {* ../../docs_src/python_types/tutorial010_py310.py hl[6] *}
    
    接着,你会再次获得所有的编辑器支持:
    
    <img src="/img/python-types/image06.png">
    
    注意,这表示“`one_person` 是类 `Person` 的一个实例(instance)”。
    
    它并不表示“`one_person` 是名为 `Person` 的类本身(class)”。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 10.6K bytes
    - Click Count (0)
  9. docs/en/docs/tutorial/metadata.md

    | `license_info`...
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  10. docs/de/llm-prompt.md

    Example:
    
    Source (English):
    
    ```
    ## Another module with `APIRouter` { #another-module-with-apirouter }
    ```
    
    Translate with (German):
    
    ```
    ## Ein weiteres Modul mit `APIRouter` { #another-module-with-apirouter }
    ```
    
    Do NOT translate with (German) – notice the added period:
    
    ```
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Dec 29 18:54:20 GMT 2025
    - 9.8K bytes
    - Click Count (0)
Back to Top