Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 200 for define (0.2 sec)

  1. docs/en/docs/reference/request.md

    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Request
    ```
    
    !!! tip
        When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 516 bytes
    - Viewed (0)
  2. .cm/complex_changes.cm

    # this PR, this automations will have its `if` checked to run.  In a way, the `on` conditions
    # function as an implicit first `if` for every automation in the file.
    
    # You can define multiple automations in a .cm file, but each automation name should be unique
    # within the file.  We keep each automation (or very closely related group of automations) in
    # its own file.
    
    on:
      - pr_created
      - commit
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Apr 12 13:42:16 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. docs/en/docs/reference/websockets.md

    It is provided directly by Starlette, but you can import it from `fastapi`:
    
    ```python
    from fastapi import WebSocket
    ```
    
    !!! tip
        When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
    
    ::: fastapi.WebSocket
        options:
            members:
                - scope
                - app
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  4. .cm/add_usual_expert.cm

    # this PR, this automations will have its `if` checked to run.  In a way, the `on` conditions
    # function as an implicit first `if` for every automation in the file.
    
    # You can define multiple automations in a .cm file, but each automation name should be unique
    # within the file.  We keep each automation (or very closely related group of automations) in
    # its own file.
    
    on:
      - pr_created
      - commit
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Apr 12 13:42:16 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/request-forms-and-files.md

    # Request Forms and Files
    
    You can define files and form fields at the same time using `File` and `Form`.
    
    !!! info
        To receive uploaded files and/or form data, first install <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
    
        E.g. `pip install python-multipart`.
    
    ## Import `File` and `Form`
    
    === "Python 3.9+"
    
        ```Python hl_lines="3"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 2K bytes
    - Viewed (0)
  6. .cm/estimated_time_to_review.cm

        run:
          - action: add-label@v1
            # etr is defined in the last section of this example
            args:
              label: "{{ calc.etr }} min review"
              color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}
    
    # To simplify the automations section, some calculations are placed under unique YAML keys defined here.
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Apr 12 13:42:16 GMT 2024
    - 2K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/events.md

    # Lifespan Events
    
    You can define logic (code) that should be executed before the application **starts up**. This means that this code will be executed **once**, **before** the application **starts receiving requests**.
    
    The same way, you can define logic (code) that should be executed when the application is **shutting down**. In this case, this code will be executed **once**, **after** having handled possibly **many requests**.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. docs/en/docs/reference/uploadfile.md

    # `UploadFile` class
    
    You can define *path operation function* parameters to be of the type `UploadFile` to receive files from the request.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import UploadFile
    ```
    
    ::: fastapi.UploadFile
        options:
            members:
                - file
                - filename
                - size
                - headers
                - content_type
                - read
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 472 bytes
    - Viewed (0)
  9. .cm/platform_labels.cm

      {% endfor %}
    
    # To simplify the automations section, some calculations are placed under unique YAML keys defined here.
    # Read the "|" not as "or", but as a "pipe", taking the output of the previous command and passing it to the next command.
    
    # TODO: It would be very nice to avoid having this list somehow, but it needs to be defined in YAML and not in JS for the looping template to work
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Mon Apr 22 15:32:31 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. docs/en/docs/alternatives.md

    But it was created before there existed Python type hints. So, to define every <abbr title="the definition of how data should be formed">schema</abbr> you need to use specific utils and classes provided by Marshmallow.
    
    !!! check "Inspired **FastAPI** to"
        Use code to define "schemas" that provide data types and validation, automatically.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
Back to top