Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 332 for fine (0.16 sec)

  1. tests/test_request_body_parameters_media_type.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  2. docs/en/docs/features.md

    No more typing the wrong key names, coming back and forth between docs, or scrolling up and down to find if you finally used `username` or `user_name`.
    
    ### Short
    
    It has sensible **defaults** for everything, with optional configurations everywhere. All the parameters can be fine-tuned to do what you need and to define the API you need.
    
    But by default, it all **"just works"**.
    
    ### Validation
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. docs/en/docs/async.md

    ---
    
    Imagine you are the computer / program 🤖 in that story.
    
    While you are at the line, you are just idle 😴, waiting for your turn, not doing anything very "productive". But the line is fast because the cashier is only taking the orders (not preparing them), so that's fine.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/security/oauth2-scopes.md

    # OAuth2 scopes
    
    You can use OAuth2 scopes directly with **FastAPI**, they are integrated to work seamlessly.
    
    This would allow you to have a more fine-grained permission system, following the OAuth2 standard, integrated into your OpenAPI application (and the API docs).
    
    OAuth2 with scopes is the mechanism used by many big authentication providers, like Facebook, Google, GitHub, Microsoft, Twitter, etc. They use it to provide specific permissions to users and applications.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  5. docs/en/docs/deployment/docker.md

    2. Set the current working directory to `/code`.
    
        This is where we'll put the `requirements.txt` file and the `app` directory.
    
    3. Copy the file with the requirements to the `/code` directory.
    
        Copy **only** the file with the requirements first, not the rest of the code.
    
        As this file **doesn't change often**, Docker will detect it and use the **cache** for this step, enabling the cache for the next step too.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 34.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/oauth2-jwt.md

    And you can use and implement secure, standard protocols, like OAuth2 in a relatively simple way.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/bigger-applications.md

    Wenn Sie eine Anwendung oder eine Web-API erstellen, ist es selten der Fall, dass Sie alles in einer einzigen Datei unterbringen können.
    
    **FastAPI** bietet ein praktisches Werkzeug zur Strukturierung Ihrer Anwendung bei gleichzeitiger Wahrung der Flexibilität.
    
    !!! info
         Wenn Sie von Flask kommen, wäre dies das Äquivalent zu Flasks Blueprints.
    
    ## Eine Beispiel-Dateistruktur
    
    Nehmen wir an, Sie haben eine Dateistruktur wie diese:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:27:59 GMT 2024
    - 21.1K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/custom-response.md

    ```Python hl_lines="2  14"
    {!../../../docs_src/custom_response/tutorial007.py!}
    ```
    
    #### Using `StreamingResponse` with file-like objects
    
    If you have a file-like object (e.g. the object returned by `open()`), you can create a generator function to iterate over that file-like object.
    
    That way, you don't have to read it all first in memory, and you can pass that generator function to the `StreamingResponse`, and return it.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/schema-extra-example.md

        Lembre-se de que esses argumentos extras passados ​​não adicionarão nenhuma validação, apenas informações extras, para fins de documentação.
    
    ## `example` e `examples` no OpenAPI
    
    Ao usar quaisquer dos:
    
    * `Path()`
    * `Query()`
    * `Header()`
    * `Cookie()`
    * `Body()`
    * `Form()`
    * `File()`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_large_file(tmp_path):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top