Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Glasser (0.17 sec)

  1. docs/en/docs/advanced/advanced-dependencies.md

    All the dependencies we have seen are a fixed function or class.
    
    But there could be cases where you want to be able to set parameters on the dependency, without having to declare many different functions or classes.
    
    Let's imagine that we want to have a dependency that checks if the query parameter `q` contains some fixed content.
    
    But we want to be able to parameterize that fixed content.
    
    ## A "callable" instance
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. docs/de/docs/advanced/advanced-dependencies.md

    ## Eine „aufrufbare“ Instanz
    
    In Python gibt es eine Möglichkeit, eine Instanz einer Klasse „aufrufbar“ („callable“) zu machen.
    
    Nicht die Klasse selbst (die bereits aufrufbar ist), sondern eine Instanz dieser Klasse.
    
    Dazu deklarieren wir eine Methode `__call__`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:49 GMT 2024
    - 4.3K bytes
    - Viewed (0)
Back to top