Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for Variable (0.2 sec)

  1. docs/fr/docs/tutorial/debugging.md

    #### Pour davantage de détails
    
    Imaginons que votre fichier s'appelle `myapp.py`.
    
    Si vous l'exécutez avec :
    
    <div class="termy">
    
    ```console
    $ python myapp.py
    ```
    
    </div>
    
    alors la variable interne `__name__` de votre fichier, créée automatiquement par Python, aura pour valeur la chaîne de caractères `"__main__"`.
    
    Ainsi, la section :
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Mar 06 16:26:49 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/conditional-openapi.md

    Here we declare the setting `openapi_url` with the same default of `"/openapi.json"`.
    
    And then we use it when creating the `FastAPI` app.
    
    Then you could disable OpenAPI (including the UI docs) by setting the environment variable `OPENAPI_URL` to the empty string, like:
    
    <div class="termy">
    
    ```console
    $ OPENAPI_URL= uvicorn main:app
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/path-operation-configuration.md

        ```
    
    ## Beschreibung mittels Docstring
    
    Da Beschreibungen oft mehrere Zeilen lang sind, können Sie die Beschreibung der *Pfadoperation* im <abbr title="Ein mehrzeiliger String (keiner Variable zugewiesen) als erster Ausdruck in einer Funktion, wird für die Dokumentation derselben verwendet">Docstring</abbr> der Funktion deklarieren, und **FastAPI** wird sie daraus auslesen.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:48 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  4. docs/es/docs/python-types.md

    #### Listas
    
    Por ejemplo, vamos a definir una variable para que sea una `list` compuesta de `str`.
    
    De `typing`, importa `List` (con una `L` mayúscula):
    
    ```Python hl_lines="1"
    {!../../../docs_src/python_types/tutorial006.py!}
    ```
    
    Declara la variable con la misma sintaxis de los dos puntos (`:`).
    
    Pon `List` como el tipo.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/nosql-databases-couchbase.md

    ### f-strings
    
    If you are not familiar with the `f"userprofile::{username}"`, it is a Python "<a href="https://docs.python.org/3/glossary.html#term-f-string" class="external-link" target="_blank">f-string</a>".
    
    Any variable that is put inside of `{}` in an f-string will be expanded / injected in the string.
    
    ### `dict` unpacking
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/debugging.md

    So, if you have another file `importer.py` with:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    in that case, the automatically created variable inside of `myapp.py` will not have the variable `__name__` with a value of `"__main__"`.
    
    So, the line:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    will not be executed.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jun 22 17:04:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/security/first-steps.md

        That's because it is using the same name as in the OpenAPI spec. So that if you need to investigate more about any of these security schemes you can just copy and paste it to find more information about it.
    
    The `oauth2_scheme` variable is an instance of `OAuth2PasswordBearer`, but it is also a "callable".
    
    It could be called as:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    So, it can be used with `Depends`.
    
    ### Use it
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/extra-models.md

    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    ```
    
    and then we call:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    we now have a `dict` with the data in the variable `user_dict` (it's a `dict` instead of a Pydantic model object).
    
    And if we call:
    
    ```Python
    print(user_dict)
    ```
    
    we would get a Python `dict` with:
    
    ```Python
    {
        'username': 'john',
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  9. docs/en/docs/tutorial/path-operation-configuration.md

    As descriptions tend to be long and cover multiple lines, you can declare the *path operation* description in the function <abbr title="a multi-line string as the first expression inside a function (not assigned to any variable) used for documentation">docstring</abbr> and **FastAPI** will read it from there.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/extra-models.md

    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    ```
    
    und wir rufen seine `.dict()`-Methode auf:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    dann haben wir jetzt in der Variable `user_dict` ein `dict` mit den gleichen Daten (es ist ein `dict` statt eines Pydantic-Modellobjekts).
    
    Wenn wir es ausgeben:
    
    ```Python
    print(user_dict)
    ```
    
    bekommen wir ein Python-`dict`:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
Back to top