Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 49 of 49 for addr (0.13 sec)

  1. fastapi/routing.py

            def decorator(func: DecoratedCallable) -> DecoratedCallable:
                self.add_route(
                    path,
                    func,
                    methods=methods,
                    name=name,
                    include_in_schema=include_in_schema,
                )
                return func
    
            return decorator
    
        def add_api_route(
            self,
            path: str,
            endpoint: Callable[..., Any],
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/schema-extra-example.md

    !!! tip
        You could use the same technique to extend the JSON Schema and add your own custom extra info.
    
        For example you could use it to add metadata for a frontend user interface, etc.
    
    !!! info
        OpenAPI 3.1.0 (used since FastAPI 0.99.0) added support for `examples`, which is part of the **JSON Schema** standard.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  3. tests/test_custom_middleware_exception.py

            await self.app(scope, wrapper, send)
    
    
    @router.post("/middleware")
    def run_middleware(file: UploadFile = File(..., description="Big File")):
        return {"message": "OK"}
    
    
    app.include_router(router)
    app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8)
    
    
    client = TestClient(app)
    
    
    def test_custom_middleware_exception(tmp_path: Path):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 25 21:44:40 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/debugging.md

    ---
    
    For example, in Visual Studio Code, you can:
    
    * Go to the "Debug" panel.
    * "Add configuration...".
    * Select "Python"
    * Run the debugger with the option "`Python: Current File (Integrated Terminal)`".
    
    It will then start the server with your **FastAPI** code, stop at your breakpoints, etc.
    
    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)
  5. docs/en/docs/deployment/docker.md

    RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
    
    COPY ./app /code/app
    
    CMD ["fastapi", "run", "app/main.py", "--port", "80"]
    
    # If running behind a proxy like Nginx or Traefik add --proxy-headers
    # CMD ["fastapi", "run", "app/main.py", "--port", "80", "--proxy-headers"]
    ```
    
    </details>
    
    ## What is a Container
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 34K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/cors.md

    ## Use `CORSMiddleware`
    
    You can configure it in your **FastAPI** application using the `CORSMiddleware`.
    
    * Import `CORSMiddleware`.
    * Create a list of allowed origins (as strings).
    * Add it as a "middleware" to your **FastAPI** application.
    
    You can also specify if your backend allows:
    
    * Credentials (Authorization headers, Cookies, etc).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 20:28:37 GMT 2022
    - 5.1K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/path-operation-advanced-configuration.md

        }
    }
    ```
    
    ### Custom OpenAPI *path operation* schema
    
    The dictionary in `openapi_extra` will be deeply merged with the automatically generated OpenAPI schema for the *path operation*.
    
    So, you could add additional data to the automatically generated schema.
    
    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 (0)
  8. docs/en/docs/tutorial/body.md

    ...as `description` and `tax` are optional (with a default value of `None`), this JSON "`object`" would also be valid:
    
    ```JSON
    {
        "name": "Foo",
        "price": 45.2
    }
    ```
    
    ## Declare it as a parameter
    
    To add it to your *path operation*, declare it the same way you declared path and query parameters:
    
    === "Python 3.10+"
    
        ```Python hl_lines="16"
        {!> ../../../docs_src/body/tutorial001_py310.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. docs/pt/docs/deployment/docker.md

    RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
    
    COPY ./app /code/app
    
    CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
    
    # If running behind a proxy like Nginx or Traefik add --proxy-headers
    # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--proxy-headers"]
    ```
    
    </details>
    
    ## O que Ă© um ContĂȘiner
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 37.4K bytes
    - Viewed (0)
Back to top