Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 113 for onOpen (0.15 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001_03.py

        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_upload_file(tmp_path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        client = TestClient(app)
        with path.open("rb") as file:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 6K bytes
    - Viewed (0)
  2. fastapi/security/__init__.py

    from .oauth2 import OAuth2PasswordRequestForm as OAuth2PasswordRequestForm
    from .oauth2 import OAuth2PasswordRequestFormStrict as OAuth2PasswordRequestFormStrict
    from .oauth2 import SecurityScopes as SecurityScopes
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 881 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_background_tasks/test_tutorial002_an.py

        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 571 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_background_tasks/test_tutorial002_an_py310.py

        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 631 bytes
    - Viewed (0)
  5. docs_src/background_tasks/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import BackgroundTasks, Depends, FastAPI
    
    app = FastAPI()
    
    
    def write_log(message: str):
        with open("log.txt", mode="a") as log:
            log.write(message)
    
    
    def get_query(background_tasks: BackgroundTasks, q: str | None = None):
        if q:
            message = f"found query: {q}\n"
            background_tasks.add_task(write_log, message)
        return q
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 683 bytes
    - Viewed (1)
  6. docs/en/docs/tutorial/path-params.md

    !!! check
        This will give you editor support inside of your function, with error checks, completion, etc.
    
    ## Data <abbr title="also known as: serialization, parsing, marshalling">conversion</abbr>
    
    If you run this example and open your browser at <a href="http://127.0.0.1:8000/items/3" class="external-link" target="_blank">http://127.0.0.1:8000/items/3</a>, you will see a response of:
    
    ```JSON
    {"item_id":3}
    ```
    
    !!! check
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/behind-a-proxy.md

    Up to here, everything would work as normally.
    
    But then, when you open the integrated docs UI (the frontend), it would expect to get the OpenAPI schema at `/openapi.json`, instead of `/api/v1/openapi.json`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  8. docs/en/docs/alternatives.md

    That's why when talking about version 2.0 it's common to say "Swagger", and for version 3+ "OpenAPI".
    
    !!! check "Inspired **FastAPI** to"
        Adopt and use an open standard for API specifications, instead of a custom schema.
    
        And integrate standards-based user interface tools:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  9. docs/it/docs/index.md

    * **Robusto**: Crea codice pronto per la produzione con documentazione automatica interattiva.
    * **Basato sugli standard**: Basato su (e completamente compatibile con) gli open standard per le API: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (precedentemente Swagger) e <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/request-files.md

        그럼에도, **FastAPI**는 표준 Open API를 사용해 이미 호환이 가능합니다.
    
        따라서 Swagger UI 또는 기타 그 외의 OpenAPI를 지원하는 툴이 다중 파일 업로드를 지원하는 경우, 이들은 **FastAPI**와 호환됩니다.
    
    !!! note "기술적 세부사항"
        `from starlette.responses import HTMLResponse` 역시 사용할  수 있습니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
Back to top