Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 129 for World (0.19 sec)

  1. docs_src/app_testing/tutorial001.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    def test_read_main():
        response = client.get("/")
        assert response.status_code == 200
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 334 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_wsgi/test_tutorial001.py

        response = client.get("/v1/")
        assert response.status_code == 200, response.text
        assert response.text == "Hello, World from Flask!"
    
    
    def test_app():
        response = client.get("/v2")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 436 bytes
    - Viewed (0)
  3. tests/test_orjson_response_class.py

    @app.get("/orjson_non_str_keys")
    def get_orjson_non_str_keys():
        key = quoted_name(value="msg", quote=False)
        return {key: "Hello World", 1: 1}
    
    
    client = TestClient(app)
    
    
    def test_orjson_non_str_keys():
        with client:
            response = client.get("/orjson_non_str_keys")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Sep 02 10:17:31 GMT 2022
    - 562 bytes
    - Viewed (0)
  4. tests/test_router_redirect_slashes.py

    from fastapi.testclient import TestClient
    
    
    def test_redirect_slashes_enabled():
        app = FastAPI()
        router = APIRouter()
    
        @router.get("/hello/")
        def hello_page() -> str:
            return "Hello, World!"
    
        app.include_router(router)
    
        client = TestClient(app)
    
        response = client.get("/hello/", follow_redirects=False)
        assert response.status_code == 200
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jun 22 10:37:50 GMT 2023
    - 974 bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/wsgi.md

    ```txt
    Hello, World from Flask!
    ```
    
    并且如果您访问 <a href="http://localhost:8000/v2" class="external-link" target="_blank">http://localhost:8000/v2</a>,您将会看到由 FastAPI 返回的响应:
    
    ```JSON
    {
        "message": "Hello World"
    }
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. docs_src/first_steps/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def root():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 117 bytes
    - Viewed (0)
  7. docs_src/debugging/tutorial001.py

    import uvicorn
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
        a = "a"
        b = "b" + a
        return {"hello world": b}
    
    
    if __name__ == "__main__":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 223 bytes
    - Viewed (0)
  8. docs/en/docs/advanced/behind-a-proxy.md

    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    The response would be something like:
    
    ```JSON
    {
        "message": "Hello World",
        "root_path": "/api/v1"
    }
    ```
    
    ### Setting the `root_path` in the FastAPI app
    
    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)
  9. docs/pl/docs/index.md

    * Utwórz plik o nazwie `main.py` z:
    
    ```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
    - 19.4K bytes
    - Viewed (0)
  10. docs/ru/docs/index.md

    * Создайте файл `main.py` со следующим содержимым:
    
    ```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
    - 25.8K bytes
    - Viewed (0)
Back to top