Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 550 for Context (0.28 sec)

  1. scripts/playwright/separate_openapi_schemas/image02.py

    import subprocess
    
    from playwright.sync_api import Playwright, sync_playwright
    
    
    def run(playwright: Playwright) -> None:
        browser = playwright.chromium.launch(headless=False)
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_text("GET/items/Read Items").click()
        page.get_by_role("button", name="Try it out").click()
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 873 bytes
    - Viewed (0)
  2. docs_src/security/tutorial004_an_py310.py

    class UserInDB(User):
        hashed_password: str
    
    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. docs_src/security/tutorial005_an.py

    class UserInDB(User):
        hashed_password: str
    
    
    pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
        scopes={"me": "Read information about the current user.", "items": "Read items."},
    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. docs/pt/docs/advanced/templates.md

    * Declare um parรขmetro `Request` no *path operation* que retornarรก um template.
    * Use o `template` que vocรช criou para renderizar e retornar uma `TemplateResponse`, passe o nome do template, o request object, e um "context" dict com pares chave-valor a serem usados dentro do template do Jinja2.
    
    ```Python hl_lines="4  11  15-18"
    {!../../../docs_src/templates/tutorial001.py!}
    ```
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 28 04:05:17 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  5. pyproject.toml

    ]
    
    [tool.coverage.run]
    parallel = true
    source = [
        "docs_src",
        "tests",
        "fastapi"
    ]
    context = '${CONTEXT}'
    omit = [
        "docs_src/response_model/tutorial003_04.py",
        "docs_src/response_model/tutorial003_04_py310.py",
    ]
    
    [tool.ruff.lint]
    select = [
        "E",  # pycodestyle errors
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/oauth2-jwt.md

    ## Hash and verify the passwords
    
    Import the tools we need from `passlib`.
    
    Create a PassLib "context". This is what will be used to hash and verify passwords.
    
    !!! tip
        The PassLib context also has functionality to use different hashing algorithms, including deprecated old ones only to allow verifying them, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    # ๐Ÿ”— โฎ๏ธ ๐ŸŒพ
    
    FastAPI ๐Ÿ•โ€๐Ÿฆบ ๐Ÿ”— ๐Ÿ‘ˆ <abbr title='sometimes also called "exit", "cleanup", "teardown", "close", "context managers", ...'>โž• ๐Ÿ” โฎ๏ธ ๐Ÿ</abbr>.
    
    ๐Ÿ‘‰, โš™๏ธ `yield` โ†ฉ๏ธ `return`, &amp; โœ โž• ๐Ÿ” โฎ๏ธ.
    
    !!! tip
        โš’ ๐Ÿ’ญ โš™๏ธ `yield` 1๏ธโƒฃ ๐Ÿ‘ ๐Ÿ•ฐ.
    
    !!! note "๐Ÿ“ก โ„น"
        ๐Ÿ™† ๐Ÿ”ข ๐Ÿ‘ˆ โ˜‘ โš™๏ธ โฎ๏ธ:
    
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> โš–๏ธ
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  8. tests/test_dependency_contextmanager.py

    
    @app.get("/context_b")
    async def get_context_b(state: dict = Depends(context_b)):
        return state
    
    
    @app.get("/context_b_raise")
    async def get_context_b_raise(state: dict = Depends(context_b)):
        assert state["context_b"] == "started b"
        assert state["context_a"] == "started a"
        raise OtherDependencyError()
    
    
    @app.get("/context_b_bg")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  9. .github/workflows/smokeshow.yml

    jobs:
      smokeshow:
        if: ${{ github.event.workflow_run.conclusion == 'success' }}
        runs-on: ubuntu-latest
    
        steps:
          - name: Dump GitHub context
            env:
              GITHUB_CONTEXT: ${{ toJson(github) }}
            run: echo "$GITHUB_CONTEXT"
          - uses: actions/setup-python@v5
            with:
              python-version: '3.9'
    
          - run: pip install smokeshow
    
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 19 01:33:28 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  10. .github/workflows/label-approved.yml

      workflow_dispatch:
    
    jobs:
      label-approved:
        if: github.repository_owner == 'tiangolo'
        runs-on: ubuntu-latest
        steps:
        - name: Dump GitHub context
          env:
            GITHUB_CONTEXT: ${{ toJson(github) }}
          run: echo "$GITHUB_CONTEXT"
        - uses: docker://tiangolo/label-approved:0.0.4
          with:
            token: ${{ secrets.FASTAPI_LABEL_APPROVED }}
            config: >
              {
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 18:43:10 GMT 2024
    - 610 bytes
    - Viewed (0)
Back to top