Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1111 - 1120 of 1,977 for Fastapi (0.11 sec)

  1. fastapi/params.py

    import warnings
    from enum import Enum
    from typing import Any, Callable, Dict, List, Optional, Sequence, Union
    
    from fastapi.openapi.models import Example
    from pydantic.fields import FieldInfo
    from typing_extensions import Annotated, deprecated
    
    from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined
    
    _Unset: Any = Undefined
    
    
    class ParamTypes(Enum):
        query = "query"
        header = "header"
        path = "path"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 18:06:20 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  2. tests/test_serialize_response_model.py

    from typing import Dict, List, Optional
    
    from fastapi import FastAPI
    from pydantic import BaseModel, Field
    from starlette.testclient import TestClient
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str = Field(alias="aliased_name")
        price: Optional[float] = None
        owner_ids: Optional[List[int]] = None
    
    
    @app.get("/items/valid", response_model=Item)
    def get_valid():
        return Item(aliased_name="valid", price=1.0)
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  3. tests/test_param_in_path_and_dependency.py

    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    async def user_exists(user_id: int):
        return True
    
    
    @app.get("/users/{user_id}", dependencies=[Depends(user_exists)])
    async def read_users(user_id: int):
        pass
    
    
    client = TestClient(app)
    
    
    def test_read_users():
        response = client.get("/users/42")
        assert response.status_code == 200, response.text
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. docs/nl/docs/features.md

    ## Starlette functies
    
    **FastAPI** is volledig verenigbaar met (en gebaseerd op) <a href="https://www.starlette.io/" class="external-link" target="_blank"><strong>Starlette</strong></a>.
    
    `FastAPI` is eigenlijk een subklasse van `Starlette`. Dus als je Starlette al kent of gebruikt, zal de meeste functionaliteit op dezelfde manier werken.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 03 13:50:38 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  5. .github/actions/people/app/main.py

    github_graphql_url = "https://api.github.com/graphql"
    questions_category_id = "MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMyMDAxNDM0"
    
    discussions_query = """
    query Q($after: String, $category_id: ID) {
      repository(name: "fastapi", owner: "fastapi") {
        discussions(first: 100, after: $after, categoryId: $category_id) {
          edges {
            cursor
            node {
              number
              author {
                login
                avatarUrl
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/index.md

    ```
    
    </div>
    
    コードを記述またはコピーし、編集してローカルで実行することを**強くお勧めします**。
    
    また、エディターで使用することで、書く必要のあるコードの少なさ、すべての型チェック、自動補完などのFastAPIの利点を実感できます。
    
    ---
    
    ## FastAPIをインストールする
    
    最初のステップは、FastAPIのインストールです。
    
    チュートリアルのために、すべてのオプションの依存関係と機能をインストールしたいとき:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[all]"
    
    ---> 100%
    ```
    
    </div>
    
    ...これには、コードを実行するサーバーとして使用できる `uvicorn`も含まれます。
    
    /// note | "備考"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/bigger-applications.md

    ///
    
    ## Das Haupt-`FastAPI`.
    
    Sehen wir uns nun das Modul unter `app/main.py` an.
    
    Hier importieren und verwenden Sie die Klasse `FastAPI`.
    
    Dies ist die Hauptdatei Ihrer Anwendung, die alles zusammen bindet.
    
    Und da sich der Großteil Ihrer Logik jetzt in seinem eigenen spezifischen Modul befindet, wird die Hauptdatei recht einfach sein.
    
    ### `FastAPI` importieren
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. docs_src/sql_databases/tutorial001.py

    from typing import List, Union
    
    from fastapi import Depends, FastAPI, HTTPException, Query
    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class Hero(SQLModel, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        name: str = Field(index=True)
        age: Union[int, None] = Field(default=None, index=True)
        secret_name: str
    
    
    sqlite_file_name = "database.db"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. docs_src/sql_databases/tutorial001_py310.py

    from fastapi import Depends, FastAPI, HTTPException, Query
    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class Hero(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str = Field(index=True)
        age: int | None = Field(default=None, index=True)
        secret_name: str
    
    
    sqlite_file_name = "database.db"
    sqlite_url = f"sqlite:///{sqlite_file_name}"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_extra_models/test_tutorial004_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.extra_models.tutorial004_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get_items(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
Back to top