Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1221 - 1230 of 1,962 for fastapi (0.07 sec)

  1. docs/em/docs/advanced/templates.md

    # ๐Ÿ“„
    
    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐Ÿ™† ๐Ÿ“„ ๐Ÿš’ ๐Ÿ‘† ๐Ÿ’š โฎ๏ธ **FastAPI**.
    
    โš  โš’ Jinja2๏ธโƒฃ, ๐ŸŽ 1๏ธโƒฃ โš™๏ธ ๐Ÿบ & ๐ŸŽ ๐Ÿงฐ.
    
    ๐Ÿ“ค ๐Ÿš™ ๐Ÿ”— โšซ๏ธ ๐Ÿ’ช ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐Ÿ”— ๐Ÿ‘† **FastAPI** ๐Ÿˆธ (๐Ÿšš ๐Ÿ’ƒ).
    
    ## โŽ ๐Ÿ”—
    
    โŽ `jinja2`:
    
    <div class="termy">
    
    ```console
    $ pip install jinja2
    
    ---> 100%
    ```
    
    </div>
    
    ## โš™๏ธ `Jinja2Templates`
    
    * ๐Ÿ—„ `Jinja2Templates`.
    * โœ `templates` ๐ŸŽš ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿ’ช ๐Ÿค-โš™๏ธ โช.
    * ๐Ÿ“ฃ `Request` ๐Ÿ”ข *โžก ๐Ÿ› ๏ธ* ๐Ÿ‘ˆ ๐Ÿ”œ ๐Ÿ“จ ๐Ÿ“„.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/using-request-directly.md

    # โš™๏ธ ๐Ÿ“จ ๐Ÿ”—
    
    ๐Ÿ†™ ๐Ÿ”œ, ๐Ÿ‘† โœ”๏ธ ๐Ÿ“ฃ ๐Ÿ• ๐Ÿ“จ ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿ’ช โฎ๏ธ ๐Ÿ‘ซ ๐Ÿ†Ž.
    
    โœŠ ๐Ÿ“Š โšช๏ธโžก๏ธ:
    
    * โžก ๐Ÿ”ข.
    * ๐ŸŽš.
    * ๐Ÿช.
    * โ™’๏ธ.
    
    &amp; ๐Ÿ”จ, **FastAPI** โš– ๐Ÿ‘ˆ ๐Ÿ’ฝ, ๐Ÿญ โšซ๏ธ &amp; ๐Ÿญ ๐Ÿงพ ๐Ÿ‘† ๐Ÿ› ๏ธ ๐Ÿ”.
    
    โœ‹๏ธ ๐Ÿ“ค โš  ๐ŸŒโ” ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ’ช ๐Ÿ” `Request` ๐ŸŽš ๐Ÿ”—.
    
    ## โ„น ๐Ÿ”ƒ `Request` ๐ŸŽš
    
    **FastAPI** ๐Ÿค™ **๐Ÿ’ƒ** ๐Ÿ”˜, โฎ๏ธ ๐Ÿงฝ ๐Ÿ“š ๐Ÿงฐ ๐Ÿ”› ๐Ÿ”, ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐Ÿ’ƒ <a href="https://www.starlette.io/requests/" class="external-link" target="_blank">`Request`</a> ๐ŸŽš ๐Ÿ”— ๐Ÿ•โ” ๐Ÿ‘† ๐Ÿ’ช.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. tests/test_response_model_sub_types.py

    from typing import List
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class Model(BaseModel):
        name: str
    
    
    app = FastAPI()
    
    
    @app.get("/valid1", responses={"500": {"model": int}})
    def valid1():
        pass
    
    
    @app.get("/valid2", responses={"500": {"model": List[int]}})
    def valid2():
        pass
    
    
    @app.get("/valid3", responses={"500": {"model": Model}})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  4. docs_src/metadata/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI(docs_url="/documentation", redoc_url=None)
    
    
    @app.get("/items/")
    async def read_items():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 02 04:55:20 UTC 2020
    - 161 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_nested_models/test_tutorial009.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_nested_models.tutorial009 import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body(client: TestClient):
        data = {"2": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.openapi_webhooks.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/users/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Rick", "Morty"]
    
    
    def test_dummy_webhook():
        # Just for coverage
        app.webhooks.routes[0].endpoint({})
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Oct 20 09:00:44 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  7. scripts/lint.sh

    #!/usr/bin/env bash
    
    set -e
    set -x
    
    mypy fastapi
    ruff check fastapi tests docs_src scripts
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Apr 30 00:03:14 UTC 2024
    - 125 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_params_str_validations/test_tutorial011_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.query_params_str_validations.tutorial011_an import app
    
    client = TestClient(app)
    
    
    def test_multi_query_values():
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_query_no_values():
        url = "/items/"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial006_an.py

    from base64 import b64encode
    
    from fastapi.testclient import TestClient
    
    from docs_src.security.tutorial006_an import app
    
    client = TestClient(app)
    
    
    def test_security_http_basic():
        response = client.get("/users/me", auth=("john", "secret"))
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "john", "password": "secret"}
    
    
    def test_security_http_basic_no_credentials():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_handling_errors/test_tutorial002.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_get_item_header():
        response = client.get("/items-header/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found_header():
        response = client.get("/items-header/bar")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.3K bytes
    - Viewed (0)
Back to top