Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Hiller (0.19 sec)

  1. tests/test_response_model_data_filter.py

        return [pet1, pet2]
    
    
    client = TestClient(app)
    
    
    def test_filter_top_level_model():
        response = client.post(
            "/users", json={"email": "******@****.***", "password": "secret"}
        )
        assert response.json() == {"email": "******@****.***"}
    
    
    def test_filter_second_level_model():
        response = client.get("/pets/1")
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. docs_src/sql_databases_peewee/sql_app/crud.py

    from . import models, schemas
    
    
    def get_user(user_id: int):
        return models.User.filter(models.User.id == user_id).first()
    
    
    def get_user_by_email(email: str):
        return models.User.filter(models.User.email == email).first()
    
    
    def get_users(skip: int = 0, limit: int = 100):
        return list(models.User.select().offset(skip).limit(limit))
    
    
    def create_user(user: schemas.UserCreate):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 843 bytes
    - Viewed (0)
  3. docs/en/docs/advanced/response-cookies.md

    {!../../../docs_src/response_cookies/tutorial002.py!}
    ```
    
    And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
    
    And if you declared a `response_model`, it will still be used to filter and convert the object you returned.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  4. docs/de/docs/reference/staticfiles.md

    # Statische Dateien – `StaticFiles`
    
    Sie können die `StaticFiles`-Klasse verwenden, um statische Dateien wie JavaScript, CSS, Bilder, usw. bereitzustellen.
    
    Lesen Sie mehr darüber in der [FastAPI-Dokumentation zu statischen Dateien](../tutorial/static-files.md).
    
    Sie können sie direkt von `fastapi.staticfiles` importieren:
    
    ```python
    from fastapi.staticfiles import StaticFiles
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:14:58 GMT 2024
    - 426 bytes
    - Viewed (0)
  5. docs/en/docs/advanced/response-headers.md

    {!../../../docs_src/response_headers/tutorial002.py!}
    ```
    
    And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
    
    And if you declared a `response_model`, it will still be used to filter and convert the object you returned.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  6. tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py

    from ..utils import needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from .app_pv1 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv1
    def test_filter_sub_model(client: TestClient):
        response = client.get("/model/modelA")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "modelA",
            "description": "model-a-desc",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  7. .github/workflows/build-docs.yml

        permissions:
          pull-requests: read
        # Set job outputs to values from filter step
        outputs:
          docs: ${{ steps.filter.outputs.docs }}
        steps:
        - uses: actions/checkout@v4
        # For pull requests it's not necessary to checkout the code but for master it is
        - uses: dorny/paths-filter@v3
          id: filter
          with:
            filters: |
              docs:
                - README.md
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 03:12:00 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  8. docs_src/sql_databases/sql_app/crud.py

    from sqlalchemy.orm import Session
    
    from . import models, schemas
    
    
    def get_user(db: Session, user_id: int):
        return db.query(models.User).filter(models.User.id == user_id).first()
    
    
    def get_user_by_email(db: Session, email: str):
        return db.query(models.User).filter(models.User.email == email).first()
    
    
    def get_users(db: Session, skip: int = 0, limit: int = 100):
        return db.query(models.User).offset(skip).limit(limit).all()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/response-change-status-code.md

    For example, imagine that you want to return an HTTP status code of "OK" `200` by default.
    
    But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`.
    
    But you still want to be able to filter and convert the data you return with a `response_model`.
    
    For those cases, you can use a `Response` parameter.
    
    ## Use a `Response` parameter
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. docs/em/docs/fastapi-people.md

    <a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
    {% endfor %}
    {% endif %}
    
    {% if sponsors.silver %}
    
    ### 🥇1st 💰
    
    {% for sponsor in sponsors.silver -%}
    <a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
    {% endfor %}
    {% endif %}
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top