Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for period (0.19 sec)

  1. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

                    ),
                    "description": "Staging environment",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://prod.example.com",
                    ),
                    "description": "Production environment",
                },
            ],
            "paths": {
                "/app": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. tests/test_jsonable_encoder.py

    from .utils import needs_pydanticv1, needs_pydanticv2
    
    
    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):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. docs_src/python_types/tutorial010.py

    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    def get_person_name(one_person: Person):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 12 21:44:23 GMT 2020
    - 144 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

                    ),
                    "description": "Staging environment",
                },
                {
                    "url": IsOneOf(
                        "https://prod.example.com/",
                        # TODO: remove when deprecating Pydantic v1
                        "https://prod.example.com",
                    ),
                    "description": "Production environment",
                },
            ],
            "paths": {
                "/app": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  5. docs_src/behind_a_proxy/tutorial003.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 17:28:18 GMT 2020
    - 405 bytes
    - Viewed (0)
  6. docs_src/behind_a_proxy/tutorial004.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
        root_path_in_servers=False,
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 17:28:18 GMT 2020
    - 437 bytes
    - Viewed (0)
  7. tests/test_read_with_orm_mode.py

        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)
        data = response.json()
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  8. fastapi/applications.py

                    It can contain several fields.
    
                    * `name`: (`str`) The name of the contact person/organization.
                    * `url`: (`str`) A URL pointing to the contact information. MUST be in
                        the format of a URL.
                    * `email`: (`str`) The email address of the contact person/organization.
                        MUST be in the format of an email address.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top