Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 611 for defa (0.02 sec)

  1. tests/test_datastructures.py

    
    # TODO: remove when deprecating Pydantic v1
    def test_upload_file_invalid():
        with pytest.raises(ValueError):
            UploadFile.validate("not a Starlette UploadFile")
    
    
    def test_upload_file_invalid_pydantic_v2():
        with pytest.raises(ValueError):
            UploadFile._validate("not a Starlette UploadFile", {})
    
    
    def test_default_placeholder_equals():
        placeholder_1 = Default("a")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an_p39.py

    from tests.utils import needs_py39, needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_pv1_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    @needs_py39
    def test_post_body_form(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/model/ClassDoc.groovy

        def getPropertiesSection() { return propertiesSection }
    
        def getPropertyDetailsSection() { return getSection('Property details') }
    
        Element getMethodsTable() { return methodsTable }
    
        def getMethodsSection() { return methodsSection }
    
        def getMethodDetailsSection() { return getSection('Method details') }
    
        def getBlocksTable() { return getTable('Script blocks') }
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 6.2K bytes
    - Viewed (0)
  4. tests/test_security_openid_connect.py

    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(oid)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  5. tests/test_security_openid_connect_description.py

    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(oid)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  6. docs_src/websockets/tutorial003_py39.py

    </html>
    """
    
    
    class ConnectionManager:
        def __init__(self):
            self.active_connections: list[WebSocket] = []
    
        async def connect(self, websocket: WebSocket):
            await websocket.accept()
            self.active_connections.append(websocket)
    
        def disconnect(self, websocket: WebSocket):
            self.active_connections.remove(websocket)
    
        async def send_personal_message(self, message: str, websocket: WebSocket):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial003_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial003_py310.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial003_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  9. bin/diff_yaml.py

    import sys
    import yaml  # pyyaml
    
    # returns fully qualified resource name of the k8s resource
    
    
    def by_resource_name(res):
        if res is None:
            return ""
    
        return "{}::{}::{}".format(res['apiVersion'],
                                   res['kind'],
                                   res['metadata']['name'])
    
    
    def keydiff(k0, k1):
        k0s = set(k0)
        k1s = set(k1)
        added = k1s - k0s
        removed = k0s - k1s
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Mar 03 16:14:57 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  10. docs/em/docs/async.md

    ### ๐ŸŽง-๐Ÿ”—
    
    ๐Ÿ‘† ๐Ÿ’ช โœ”๏ธ ๐Ÿ’— ๐Ÿ”— &amp; [๐ŸŽง-๐Ÿ”—](tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} ๐Ÿšซ ๐Ÿ”  ๐ŸŽ (๐Ÿ”ข ๐Ÿ”ข ๐Ÿ”‘), ๐Ÿ‘ซ ๐Ÿ’ช โœ โฎ๏ธ `async def` &amp; โฎ๏ธ ๐Ÿ˜ `def`. โšซ๏ธ ๐Ÿ”œ ๐Ÿ‘ท, &amp; ๐Ÿ• โœ โฎ๏ธ ๐Ÿ˜ `def` ๐Ÿ”œ ๐Ÿค™ ๐Ÿ”› ๐Ÿ”ข ๐Ÿงต (โšช๏ธโžก๏ธ ๐Ÿงต) โ†ฉ๏ธ โž– "โŒ›".
    
    ### ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข
    
    ๐Ÿ™† ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿค™ ๐Ÿ”— ๐Ÿ’ช โœ โฎ๏ธ ๐Ÿ˜ `def` โš–๏ธ `async def` &amp; FastAPI ๐Ÿ† ๐Ÿšซ ๐Ÿ“‰ ๐ŸŒŒ ๐Ÿ‘† ๐Ÿค™ โšซ๏ธ.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 18.7K bytes
    - Viewed (0)
Back to top