Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,679 for App (0.15 sec)

  1. tests/test_response_model_data_filter_no_inheritance.py

        owner: User
    
    
    @app.post("/users/", response_model=User)
    async def create_user(user: UserCreate):
        return user
    
    
    @app.get("/pets/{pet_id}", response_model=PetOut)
    async def read_pet(pet_id: int):
        user = UserDB(
            email="******@****.***",
            hashed_password="secrethashed",
        )
        pet = PetDB(name="Nibbler", owner=user)
        return pet
    
    
    @app.get("/pets/", response_model=List[PetOut])
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/app/web/api/admin/relatedcontent/ApiAdminRelatedcontentAction.java

    import org.codelibs.fess.app.web.CrudMode;
    import org.codelibs.fess.app.web.api.ApiResult;
    import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse;
    import org.codelibs.fess.app.web.api.ApiResult.Status;
    import org.codelibs.fess.app.web.api.admin.FessApiAdminAction;
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. docs_src/request_files/tutorial002_py39.py

    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: list[bytes] = File()):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: list[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    async def main():
        content = """
    <body>
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 786 bytes
    - Viewed (0)
  4. docs_src/request_files/tutorial003_py39.py

    from fastapi import FastAPI, File, UploadFile
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(
        files: list[bytes] = File(description="Multiple files as bytes"),
    ):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(
        files: list[UploadFile] = File(description="Multiple files as UploadFile"),
    ):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 888 bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/app/web/api/admin/webconfig/ApiAdminWebconfigAction.java

    import org.codelibs.fess.Constants;
    import org.codelibs.fess.app.pager.WebConfigPager;
    import org.codelibs.fess.app.service.WebConfigService;
    import org.codelibs.fess.app.web.CrudMode;
    import org.codelibs.fess.app.web.api.ApiResult;
    import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse;
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial008d.py

    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial008d import app
    
        client = TestClient(app)
        return client
    
    
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/testing-database.md

    ```
    
    !!! tip
        The code for `override_get_db()` is almost exactly the same as for `get_db()`, but in `override_get_db()` we use the `TestingSessionLocal` for the testing database instead.
    
    ## Test the app
    
    Then we can just test the app as normally.
    
    ```Python hl_lines="32-47"
    {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  8. .github/actions/comment-docs-preview-in-pr/Dockerfile

    FROM python:3.10
    
    COPY ./requirements.txt /app/requirements.txt
    
    RUN pip install -r /app/requirements.txt
    
    COPY ./app /app
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 15:02:53 GMT 2024
    - 155 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial003_an_py39.py

    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_files.tutorial003_an_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    file_required = {
        "detail": [
            {
                "loc": ["body", "files"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  10. docs_src/behind_a_proxy/tutorial001.py

    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jun 11 21:53:19 GMT 2020
    - 189 bytes
    - Viewed (0)
Back to top