Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 1,452 for DEF (0.01 sec)

  1. tests/test_default_response_class_router.py

    @router_a_a.get("/")
    def get_a_a():
        return {"msg": "Hello A A"}
    
    
    @router_a_a.get("/override", response_class=PlainTextResponse)
    def get_a_a_path_override():
        return "Hello A A"
    
    
    @router_a_b_override.get("/")
    def get_a_b():
        return "Hello A B"
    
    
    @router_a_b_override.get("/override", response_class=HTMLResponse)
    def get_a_b_path_override():
        return "Hello A B"
    
    
    @router_b_override.get("/")
    def get_b():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5K bytes
    - Viewed (0)
  2. build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/PublicAPIRulesTest.groovy

        BinaryCompatibilityRepository repository
    
        def jApiClassifier = Stub(JApiClass) // represents interfaces, enums and annotations
        def jApiMethod = Stub(JApiMethod)
        def jApiField = Stub(JApiField) // represents fields and enum literals
        def jApiConstructor = Stub(JApiConstructor)
        def incubatingAnnotation = Stub(JApiAnnotation)
        def deprecatedAnnotation = Stub(JApiAnnotation)
        def overrideAnnotation = Stub(JApiAnnotation)
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Fri Dec 01 20:12:19 UTC 2023
    - 16K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial001_an_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_no_token(client: TestClient):
        response = client.get("/items")
        assert response.status_code == 401, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. 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)
  5. docs_src/sql_databases/tutorial002_an_py39.py

    engine = create_engine(sqlite_url, connect_args=connect_args)
    
    
    def create_db_and_tables():
        SQLModel.metadata.create_all(engine)
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    SessionDep = Annotated[Session, Depends(get_session)]
    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  6. scripts/docs.py

    build_site_path = Path("site_build").absolute()
    
    
    @lru_cache
    def is_mkdocs_insiders() -> bool:
        version = metadata.version("mkdocs-material")
        return "insiders" in version
    
    
    def get_en_config() -> Dict[str, Any]:
        return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8"))
    
    
    def get_lang_paths() -> List[Path]:
        return sorted(docs_path.iterdir())
    
    
    def lang_callback(lang: Optional[str]) -> Union[str, None]:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 08 11:01:17 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  7. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/TypeNameResolverTest.groovy

        def resolvesFullyQualifiedClassName() {
            when:
            def name = typeNameResolver.resolve('org.gradle.SomeClass', classMetaData)
    
            then:
            name == 'org.gradle.SomeClass'
            _ * classMetaData.innerClassNames >> []
        }
    
        def resolvesUnqualifiedNameToClassInSamePackage() {
            when:
            def name = typeNameResolver.resolve('SomeClass', classMetaData)
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 6K bytes
    - Viewed (0)
  8. docs_src/sql_databases/tutorial001_an.py

    engine = create_engine(sqlite_url, connect_args=connect_args)
    
    
    def create_db_and_tables():
        SQLModel.metadata.create_all(engine)
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    SessionDep = Annotated[Session, Depends(get_session)]
    
    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    @app.post("/heroes/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. docs/em/docs/async.md

    ### ๐ŸŽง-๐Ÿ”—
    
    ๐Ÿ‘† ๐Ÿ’ช โœ”๏ธ ๐Ÿ’— ๐Ÿ”— & [๐ŸŽง-๐Ÿ”—](tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} ๐Ÿšซ ๐Ÿ”  ๐ŸŽ (๐Ÿ”ข ๐Ÿ”ข ๐Ÿ”‘), ๐Ÿ‘ซ ๐Ÿ’ช โœ โฎ๏ธ `async def` & โฎ๏ธ ๐Ÿ˜ `def`. โšซ๏ธ ๐Ÿ”œ ๐Ÿ‘ท, & ๐Ÿ• โœ โฎ๏ธ ๐Ÿ˜ `def` ๐Ÿ”œ ๐Ÿค™ ๐Ÿ”› ๐Ÿ”ข ๐Ÿงต (โšช๏ธโžก๏ธ ๐Ÿงต) โ†ฉ๏ธ โž– "โŒ›".
    
    ### ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข
    
    ๐Ÿ™† ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿค™ ๐Ÿ”— ๐Ÿ’ช โœ โฎ๏ธ ๐Ÿ˜ `def` โš–๏ธ `async def` & 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)
  10. tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial006_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get_no_headers(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 422, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top