Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for stat (0.12 sec)

  1. docs_src/sql_databases/sql_app_py310/alt_main.py

        response = Response("Internal server error", status_code=500)
        try:
            request.state.db = SessionLocal()
            response = await call_next(request)
        finally:
            request.state.db.close()
        return response
    
    
    # Dependency
    def get_db(request: Request):
        return request.state.db
    
    
    @app.post("/users/", response_model=schemas.User)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  2. docs_src/sql_databases/sql_app/alt_main.py

        response = Response("Internal server error", status_code=500)
        try:
            request.state.db = SessionLocal()
            response = await call_next(request)
        finally:
            request.state.db.close()
        return response
    
    
    # Dependency
    def get_db(request: Request):
        return request.state.db
    
    
    @app.post("/users/", response_model=schemas.User)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.9K bytes
    - Viewed (0)
  3. tests/test_http_connection_injection.py

    from fastapi.requests import HTTPConnection
    from fastapi.testclient import TestClient
    from starlette.websockets import WebSocket
    
    app = FastAPI()
    app.state.value = 42
    
    
    async def extract_value_from_http_connection(conn: HTTPConnection):
        return conn.app.state.value
    
    
    @app.get("/http")
    async def get_value_by_http(value: int = Depends(extract_value_from_http_connection)):
        return value
    
    
    @app.websocket("/ws")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 13:56:41 GMT 2020
    - 972 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.
    
    Here's how it might look:
    
    <img src="/img/tutorial/debugging/image01.png">
    
    ---
    
    If you use Pycharm, you can:
    
    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. fastapi/datastructures.py

    from starlette.datastructures import Headers as Headers  # noqa: F401
    from starlette.datastructures import QueryParams as QueryParams  # noqa: F401
    from starlette.datastructures import State as State  # noqa: F401
    from starlette.datastructures import UploadFile as StarletteUploadFile
    from typing_extensions import Annotated, Doc
    
    
    class UploadFile(StarletteUploadFile):
        """
        A file uploaded in a request.
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. docs/ko/docs/help-fastapi.md

      - 획기적인 변화 🚨
      - 팁과 요령 ✅
    
      ## 트위터에서 FastAPI 팔로우하기
    
      [Follow @fastapi on **Twitter**](https://twitter.com/fastapi) 를 팔로우하여 **FastAPI** 에 대한 최신 뉴스를 얻을 수 있습니다. 🐦
    
      ## Star **FastAPI** in GitHub
    
      GitHub에서 FastAPI에 "star"를 붙일 수 있습니다(오른쪽 상단의 star 버튼을 클릭): https://github.com/tiangolo/fastapi. ⭐️
    
      스타를 늘림으로써, 다른 사용자들이 좀 더 쉽게 찾을 수 있고, 많은 사람들에게 유용한 것임을 나타낼 수 있습니다.
    
      ## GitHub 저장소에서  릴리즈 확인
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 22:36:57 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  7. docs/en/docs/deployment/server-workers.md

    But Gunicorn supports working as a **process manager** and allowing users to tell it which specific **worker process class** to use. Then Gunicorn would start one or more **worker processes** using that class.
    
    And **Uvicorn** has a **Gunicorn-compatible worker class**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  8. docs/ru/docs/contributing.md

    <div class="termy">
    
    ```console
    $ python ./scripts/docs.py live
    
    <span style="color: green;">[INFO]</span> Serving on http://127.0.0.1:8008
    <span style="color: green;">[INFO]</span> Start watching changes
    <span style="color: green;">[INFO]</span> Start detecting changes
    ```
    
    </div>
    
    Он запустит сайт документации по адресу: `http://127.0.0.1:8008`.
    
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 21:38:15 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  9. docs/de/docs/deployment/docker.md

    Es unterstützt auch die Ausführung von <a href="https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker#pre_start_path" class="external-link" target="_blank">**Vorab-Schritten vor dem Start** </a> mit einem Skript.
    
    !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:19:17 GMT 2024
    - 38.9K bytes
    - Viewed (0)
  10. docs/en/docs/deployment/docker.md

    A container is running as long as the **main process** (command or program) is running.
    
    A container normally has a **single process**, but it's also possible to start subprocesses from the main process, and that way you will have **multiple processes** in the same 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)
Back to top