Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 143 for Hase (0.19 sec)

  1. tests/test_security_http_base.py

    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Other", "credentials": "foobar"}
    
    
    def test_security_http_base_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. tests/test_security_http_base_optional.py

    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Other", "credentials": "foobar"}
    
    
    def test_security_http_base_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/security/first-steps.md

    !!! info
        A "bearer" token is not the only option.
    
        But it's the best one for our use case.
    
        And it might be the best for most use cases, unless you are an OAuth2 expert and know exactly why there's another option that suits better your needs.
    
        In that case, **FastAPI** also provides you with the tools to build it.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  4. tests/test_operations_signatures.py

    
    def test_signatures_consistency():
        base_sig = inspect.signature(APIRouter.get)
        for method_name in method_names:
            router_method = getattr(APIRouter, method_name)
            app_method = getattr(FastAPI, method_name)
            router_sig = inspect.signature(router_method)
            app_sig = inspect.signature(app_method)
            param: inspect.Parameter
            for key, param in base_sig.parameters.items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon May 27 12:08:13 GMT 2019
    - 934 bytes
    - Viewed (0)
  5. docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py

    from sqlalchemy.orm import sessionmaker
    
    from ..database import Base
    from ..main import app, get_db
    
    SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    
    Base.metadata.create_all(bind=engine)
    
    
    def override_get_db():
        try:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/dependencies/global-dependencies.md

    Similar to the way you can [add `dependencies` to the *path operation decorators*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, you can add them to the `FastAPI` application.
    
    In that case, they will be applied to all the *path operations* in the application:
    
    === "Python 3.9+"
    
        ```Python hl_lines="16"
        {!> ../../../docs_src/dependencies/tutorial012_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  7. docs/en/docs/deployment/https.md

    In this case, it would use the certificate for `someapp.example.com`.
    
    <img src="/img/deployment/https/https03.svg">
    
    The client already **trusts** the entity that generated that TLS certificate (in this case Let's Encrypt, but we'll see about that later), so it can **verify** that the certificate is valid.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/body-multiple-params.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="19-21"
        {!> ../../../docs_src/body_multiple_params/tutorial001.py!}
        ```
    
    !!! note
        Notice that, in this case, the `item` that would be taken from the body is optional. As it has a `None` default value.
    
    ## Multiple body parameters
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  9. docs/en/docs/reference/openapi/index.md

    # OpenAPI
    
    There are several utilities to handle OpenAPI.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 158 bytes
    - Viewed (0)
  10. docs/en/docs/deployment/concepts.md

    Of course, there are some cases where there's no problem in running the previous steps multiple times, in that case, it's a lot easier to handle.
    
    !!! tip
        Also, keep in mind that depending on your setup, in some cases you **might not even need any previous steps** before starting your application.
    
        In that case, you wouldn't have to worry about any of this. 🤷
    
    ### Examples of Previous Steps Strategies
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18K bytes
    - Viewed (0)
Back to top