Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 91 for roboto (0.39 sec)

  1. docs/en/docs/advanced/sub-applications.md

    ### Technical Details: `root_path`
    
    When you mount a sub-application as described above, FastAPI will take care of communicating the mount path for the sub-application using a mechanism from the ASGI specification called a `root_path`.
    
    That way, the sub-application will know to use that path prefix for the docs UI.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  2. docs_src/behind_a_proxy/tutorial001.py

    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jun 11 21:53:19 GMT 2020
    - 189 bytes
    - Viewed (0)
  3. docs/em/docs/advanced/sub-applications.md

    ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ”„ ๐Ÿ”— โฎ๏ธ ๐Ÿ™† 2๏ธโƒฃ ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ”ข, ๐Ÿ‘ซ ๐Ÿ”œ ๐Ÿ‘ท โ˜‘, โ†ฉ๏ธ ๐Ÿ–ฅ ๐Ÿ”œ ๐Ÿ’ช ๐Ÿ’ฌ ๐Ÿ”  ๐ŸŽฏ ๐Ÿ“ฑ โš–๏ธ ๐ŸŽง-๐Ÿ“ฑ.
    
    ### ๐Ÿ“ก โ„น: `root_path`
    
    ๐Ÿ•โ” ๐Ÿ‘† ๐Ÿ—ป ๐ŸŽง-๐Ÿˆธ ๐Ÿ”ฌ ๐Ÿ”›, FastAPI ๐Ÿ”œ โœŠ ๐Ÿ’… ๐Ÿ”— ๐Ÿ—ป โžก ๐ŸŽง-๐Ÿˆธ โš™๏ธ ๐Ÿ› ๏ธ โšช๏ธโžก๏ธ ๐Ÿ”ซ ๐Ÿ”ง ๐Ÿค™ `root_path`.
    
    ๐Ÿ‘ˆ ๐ŸŒŒ, ๐ŸŽง-๐Ÿˆธ ๐Ÿ”œ ๐Ÿ’ญ โš™๏ธ ๐Ÿ‘ˆ โžก ๐Ÿ”ก ๐Ÿฉบ ๐ŸŽš.
    
    & ๐ŸŽง-๐Ÿˆธ ๐Ÿ’ช โœ”๏ธ ๐Ÿšฎ ๐Ÿ‘ ๐Ÿ“Œ ๐ŸŽง-๐Ÿˆธ & ๐ŸŒ ๐Ÿ”œ ๐Ÿ‘ท โ˜‘, โ†ฉ๏ธ FastAPI ๐Ÿต ๐ŸŒ ๐Ÿ‘‰ `root_path`โ“‚ ๐Ÿ”.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  4. docs_src/async_tests/test_main.py

    import pytest
    from httpx import AsyncClient
    
    from .main import app
    
    
    @pytest.mark.anyio
    async def test_root():
        async with AsyncClient(app=app, base_url="http://test") as ac:
            response = await ac.get("/")
        assert response.status_code == 200
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Oct 06 15:32:11 GMT 2021
    - 306 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_params/test_tutorial004.py

        response = client.get("/files/home/johndoe/myfile.txt")
        print(response.content)
        assert response.status_code == 200, response.text
        assert response.json() == {"file_path": "home/johndoe/myfile.txt"}
    
    
    def test_root_file_path():
        response = client.get("/files//home/johndoe/myfile.txt")
        print(response.content)
        assert response.status_code == 200, response.text
        assert response.json() == {"file_path": "/home/johndoe/myfile.txt"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial003.py

                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"filenames": ["test.txt", "test2.txt"]}
    
    
    def test_get_root():
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial002.py

                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"filenames": ["test.txt", "test2.txt"]}
    
    
    def test_get_root():
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial003_py39.py

                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"filenames": ["test.txt", "test2.txt"]}
    
    
    @needs_py39
    def test_get_root(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  10. docs/hu/docs/index.md

    ### Hozd lรฉtre
    
    * Hozz lรฉtre a `main.py` fรกjlt a kรถvetkezล‘ tartalommal:
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 20.2K bytes
    - Viewed (0)
Back to top