Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 334 for Nain (0.15 sec)

  1. docs_src/app_testing/app_b_py310/main.py

    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: str | None = None
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_main(item_id: str, x_token: str = Header()):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item_id not in fake_db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 09 14:44:08 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  2. docs_src/app_testing/app_b_an/main.py

    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: Union[str, None] = None
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_main(item_id: str, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item_id not in fake_db:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  3. tests/test_modules_same_name_body/test_main.py

    from fastapi.testclient import TestClient
    
    from .app.main import app
    
    client = TestClient(app)
    
    
    def test_post_a():
        data = {"a": 2, "b": "foo"}
        response = client.post("/a/compute", json=data)
        assert response.status_code == 200, response.text
        data = response.json()
    
    
    def test_post_a_invalid():
        data = {"a": "bar", "b": "foo"}
        response = client.post("/a/compute", json=data)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  4. tests/main.py

    arjwilliams <******@****.***> 1713477419 +0100
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. tests/test_modules_same_name_body/app/main.py

    Sebastián Ramírez <******@****.***> 1561743316 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 28 17:35:16 GMT 2019
    - 150 bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app_py310/main.py

    Sebastián Ramírez <******@****.***> 1641564691 +0100
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  7. docs_src/settings/app03_an/main.py

    Sebastián Ramírez <******@****.***> 1698179166 +0400
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 451 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_testing/test_main_b_an_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_app():
        from docs_src.app_testing.app_b_an_py310 import test_main
    
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 360 bytes
    - Viewed (0)
  9. docs/fr/docs/deployment/manually.md

    === "Uvicorn"
    
        <div class="termy">
    
        ```console
        $ uvicorn main:app --host 0.0.0.0 --port 80
    
        <span style="color: green;">INFO</span>:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
        ```
    
        </div>
    
    === "Hypercorn"
    
        <div class="termy">
    
        ```console
        $ hypercorn main:app --bind 0.0.0.0:80
    
        Running on 0.0.0.0:8080 over http (CTRL + C to quit)
        ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 04 12:02:09 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/settings.md

    ### The main app file
    
    Now we create a dependency that returns a new `config.Settings()`.
    
    === "Python 3.9+"
    
        ```Python hl_lines="6  12-13"
        {!> ../../../docs_src/settings/app02_an_py39/main.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="6  12-13"
        {!> ../../../docs_src/settings/app02_an/main.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.7K bytes
    - Viewed (0)
Back to top