Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for operating (0.24 sec)

  1. tests/test_operations_signatures.py

    Sebastián Ramírez <******@****.***> 1558958893 +0400
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon May 27 12:08:13 GMT 2019
    - 934 bytes
    - Viewed (0)
  2. docs_src/path_operation_advanced_configuration/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", operation_id="some_specific_id_you_define")
    async def read_items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 167 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial005.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
  5. docs_src/openapi_callbacks/tutorial001.py

        """
        Create an invoice.
    
        This will (let's imagine) let the API user (some external developer) create an
        invoice.
    
        And this path operation will:
    
        * Send the invoice to the client.
        * Collect the money from the client.
        * Send a notification back to the API user (the external developer), as a callback.
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  6. tests/test_application.py

                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "summary": "Non Operation",
                        "operationId": "non_operation_api_route_get",
                    }
                },
                "/non_decorated_route": {
                    "get": {
                        "responses": {
                            "200": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  7. fastapi/openapi/utils.py

        if route.tags:
            operation["tags"] = route.tags
        operation["summary"] = generate_operation_summary(route=route, method=method)
        if route.description:
            operation["description"] = route.description
        operation_id = route.operation_id or route.unique_id
        if operation_id in operation_ids:
            message = (
                f"Duplicate Operation ID {operation_id} for function "
                + f"{route.endpoint.__name__}"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_response_headers/test_tutorial002.py

    from fastapi.testclient import TestClient
    
    from docs_src.response_headers.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/headers-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 378 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_headers/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.response_headers.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/headers/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World"}
        assert response.headers["X-Cat-Dog"] == "alone in the world"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 426 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial006 import app
    
    client = TestClient(app)
    
    
    def test_post():
        response = client.post("/items/", content=b"this is actually not validated")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "size": 30,
            "content": {
                "name": "Maaaagic",
                "price": 42,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
Back to top