Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 191 - 200 of 1,038 for Async (0.28 seconds)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt

    import okhttp3.internal.connection.RealCall.AsyncCall
    import okhttp3.internal.okHttpName
    import okhttp3.internal.threadFactory
    import okhttp3.internal.unmodifiable
    
    /**
     * Policy on when async requests are executed.
     *
     * Each dispatcher uses an [ExecutorService] to run calls internally. If you supply your own
     * executor, it should be able to run [the configured maximum][maxRequests] number of calls
     * concurrently.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Oct 07 14:16:22 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  2. docs_src/custom_response/tutorial002_py310.py

    from fastapi import FastAPI
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.get("/items/", response_class=HTMLResponse)
    async def read_items():
        return """
        <html>
            <head>
                <title>Some HTML in here</title>
            </head>
            <body>
                <h1>Look ma! HTML!</h1>
            </body>
        </html>
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 352 bytes
    - Click Count (0)
  3. docs_src/path_params/tutorial002_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 143 bytes
    - Click Count (0)
  4. docs_src/path_params/tutorial004_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/files/{file_path:path}")
    async def read_file(file_path: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 156 bytes
    - Click Count (0)
  5. docs_src/metadata/tutorial003_py310.py

    from fastapi import FastAPI
    
    app = FastAPI(docs_url="/documentation", redoc_url=None)
    
    
    @app.get("/items/")
    async def read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 161 bytes
    - Click Count (0)
  6. tests/test_param_in_path_and_dependency.py

    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    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")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 3.6K bytes
    - Click Count (0)
  7. docs_src/response_model/tutorial003_01_py310.py

    app = FastAPI()
    
    
    class BaseUser(BaseModel):
        username: str
        email: EmailStr
        full_name: str | None = None
    
    
    class UserIn(BaseUser):
        password: str
    
    
    @app.post("/user/")
    async def create_user(user: UserIn) -> BaseUser:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 317 bytes
    - Click Count (0)
  8. docs_src/async_tests/app_a_py310/main.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def root():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 112 bytes
    - Click Count (0)
  9. docs_src/settings/tutorial001_py310.py

    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    
    settings = Settings()
    app = FastAPI()
    
    
    @app.get("/info")
    async def info():
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
            "items_per_user": settings.items_per_user,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 419 bytes
    - Click Count (0)
  10. docs_src/response_model/tutorial002_py310.py

    app = FastAPI()
    
    
    class UserIn(BaseModel):
        username: str
        password: str
        email: EmailStr
        full_name: str | None = None
    
    
    # Don't do this in production!
    @app.post("/user/")
    async def create_user(user: UserIn) -> UserIn:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 318 bytes
    - Click Count (0)
Back to Top