Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for separator (0.18 sec)

  1. fastapi/security/http.py

                data = b64decode(param).decode("ascii")
            except (ValueError, UnicodeDecodeError, binascii.Error):
                raise invalid_user_credentials_exc  # noqa: B904
            username, separator, password = data.partition(":")
            if not separator:
                raise invalid_user_credentials_exc
            return HTTPBasicCredentials(username=username, password=password)
    
    
    class HTTPBearer(HTTPBase):
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. scripts/playwright/separate_openapi_schemas/image02.py

        page.get_by_role("button", name="Execute").click()
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image02.png"
        )
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"]
    )
    try:
        with sync_playwright() as playwright:
            run(playwright)
    finally:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 873 bytes
    - Viewed (0)
  3. docs_src/separate_openapi_schemas/tutorial002_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
    
    
    app = FastAPI(separate_input_output_schemas=False)
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 486 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client() -> TestClient:
        from docs_src.separate_openapi_schemas.tutorial002_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_create_item(client: TestClient) -> None:
        response = client.post("/items/", json={"name": "Foo"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  5. docs/en/docs/deployment/concepts.md

    ### Separate Program
    
    To achieve this, you will normally have a **separate program** that would make sure your application is run on startup. And in many cases, it would also make sure other components or applications are also run, for example, a database.
    
    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)
  6. docs/en/docs/python-types.md

    * The variable `items_s` is a `set`, and each of its items is of type `bytes`.
    
    #### Dict
    
    To define a `dict`, you pass 2 type parameters, separated by commas.
    
    The first type parameter is for the keys of the `dict`.
    
    The second type parameter is for the values of the `dict`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="1"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  7. docs/en/docs/how-to/separate-openapi-schemas.md

        {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-9]!}
    
        # Code below omitted 👇
        ```
    
        <details>
        <summary>👀 Full file preview</summary>
    
        ```Python
        {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!}
        ```
    
        </details>
    
    === "Python 3.8+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!}
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  8. docs/de/docs/how-to/separate-openapi-schemas.md

        {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py[ln:1-9]!}
    
        # Code unterhalb weggelassen 👇
        ```
    
        <details>
        <summary>👀 Vollständige Dateivorschau</summary>
    
        ```Python
        {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!}
        ```
    
        </details>
    
    === "Python 3.8+"
    
        ```Python hl_lines="9"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:18:03 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. docs/en/docs/deployment/https.md

    All this renewal process, while still serving the app, is one of the main reasons why you would want to have a **separate system to handle HTTPS** with a TLS Termination Proxy instead of just using the TLS certificates with the application server directly (e.g. Uvicorn).
    
    ## Recap
    
    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)
  10. docs/en/docs/tutorial/bigger-applications.md

    ```
    
    ## `APIRouter`
    
    Let's say the file dedicated to handling just users is the submodule at `/app/routers/users.py`.
    
    You want to have the *path operations* related to your users separated from the rest of the code, to keep it organized.
    
    But it's still part of the same **FastAPI** application/web API (it's part of the same "Python Package").
    
    You can create the *path operations* for that module using `APIRouter`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
Back to top