Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 1,916 for FastApi (0.04 sec)

  1. tests/test_read_with_orm_mode.py

    from typing import Any
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    def test_read_with_orm_mode() -> None:
        class PersonBase(BaseModel):
            name: str
            lastname: str
    
        class Person(PersonBase):
            @property
            def full_name(self) -> str:
                return f"{self.name} {self.lastname}"
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/handling-errors.md

    **FastAPI** has its own `HTTPException`.
    
    And **FastAPI**'s `HTTPException` error class inherits from Starlette's `HTTPException` error class.
    
    The only difference is that **FastAPI**'s `HTTPException` accepts any JSON-able data for the `detail` field, while Starlette's `HTTPException` only accepts strings for it.
    
    So, you can keep raising **FastAPI**'s `HTTPException` as normally in your code.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9K bytes
    - Viewed (0)
  3. docs/es/docs/benchmarks.md

        * Si estás comparando Starlette, compáralo con Sanic, Flask, Django, etc. Frameworks web (o microframeworks).
    * **FastAPI**:
        * De la misma forma en que Starlette usa Uvicorn y no puede ser más rápido que él, **FastAPI** usa Starlette, por lo que no puede ser más rápido que él.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  4. docs/ru/docs/benchmarks.md

        * Если Вы сравниваете Starlette, сравнивайте его с Sanic, Flask, Django и т. д. — веб‑фреймворками (или микрофреймворками).
    * **FastAPI**:
        * Точно так же, как Starlette использует Uvicorn и не может быть быстрее него, **FastAPI** использует Starlette, поэтому не может быть быстрее его.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  5. tests/test_security_scopes_sub_dependency.py

    # Ref: https://github.com/fastapi/fastapi/discussions/6024#discussioncomment-8541913
    
    
    from typing import Annotated
    
    import pytest
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import SecurityScopes
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="call_counts")
    def call_counts_fixture():
        return {
            "get_db_session": 0,
            "get_current_user": 0,
            "get_user_me": 0,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  6. docs/en/docs/reference/parameters.md

    * `Header()`
    * `Form()`
    * `File()`
    
    You can import them all directly from `fastapi`:
    
    ```python
    from fastapi import Body, Cookie, File, Form, Header, Path, Query
    ```
    
    ::: fastapi.Query
    
    ::: fastapi.Path
    
    ::: fastapi.Body
    
    ::: fastapi.Cookie
    
    ::: fastapi.Header
    
    ::: fastapi.Form
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 603 bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/index.md

    Using it in your editor is what really shows you the benefits of FastAPI, seeing how little code you have to write, all the type checks, autocompletion, etc.
    
    ---
    
    ## Install FastAPI { #install-fastapi }
    
    The first step is to install FastAPI.
    
    Make sure you create a [virtual environment](../virtual-environments.md){.internal-link target=_blank}, activate it, and then **install FastAPI**:
    
    <div class="termy">
    
    ```console
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  8. docs/ru/docs/how-to/extending-openapi.md

    ### Обычный **FastAPI** { #normal-fastapi }
    
    Сначала напишите приложение **FastAPI** как обычно:
    
    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *}
    
    ### Сгенерируйте схему OpenAPI { #generate-the-openapi-schema }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  9. docs_src/additional_responses/tutorial001_py39.py

    from fastapi import FastAPI
    from fastapi.responses import JSONResponse
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        id: str
        value: str
    
    
    class Message(BaseModel):
        message: str
    
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}})
    async def read_item(item_id: str):
        if item_id == "foo":
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 506 bytes
    - Viewed (0)
  10. docs_src/events/tutorial003_py39.py

    from fastapi import FastAPI
    
    
    def fake_answer_to_everything_ml_model(x: float):
        return x * 42
    
    
    ml_models = {}
    
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        # Load the ML model
        ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 569 bytes
    - Viewed (0)
Back to top