Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for url (0.13 sec)

  1. fastapi/security/open_id_connect_url.py

        dependency.
        """
    
        def __init__(
            self,
            *,
            openIdConnectUrl: Annotated[
                str,
                Doc(
                    """
                The OpenID Connect URL.
                """
                ),
            ],
            scheme_name: Annotated[
                Optional[str],
                Doc(
                    """
                    Security scheme name.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. tests/test_additional_responses_custom_model_in_callback.py

    callback_router = APIRouter(default_response_class=JSONResponse)
    
    
    @callback_router.get(
        "{$callback_url}/callback/", responses={400: {"model": CustomModel}}
    )
    def callback_route():
        pass  # pragma: no cover
    
    
    @app.post("/", callbacks=callback_router.routes)
    def main_route(callback_url: HttpUrl):
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app_py310/database.py

    from sqlalchemy import create_engine
    from sqlalchemy.ext.declarative import declarative_base
    from sqlalchemy.orm import sessionmaker
    
    SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
    # SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 461 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params_str_validations/test_tutorial011_py310.py

    
    @needs_py310
    def test_multi_query_values(client: TestClient):
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    @needs_py310
    def test_query_no_values(client: TestClient):
        url = "/items/"
        response = client.get(url)
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  5. docs_src/metadata/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI(docs_url="/documentation", redoc_url=None)
    
    
    @app.get("/items/")
    async def read_items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 02 04:55:20 GMT 2020
    - 161 bytes
    - Viewed (0)
  6. docs_src/body_nested_models/tutorial007_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
        images: list[Image] | None = None
    
    
    class Offer(BaseModel):
        name: str
        description: str | None = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 520 bytes
    - Viewed (0)
  7. docs_src/body_nested_models/tutorial004.py

    from typing import Set, Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: str
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
        image: Union[Image, None] = None
    
    
    @app.put("/items/{item_id}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 504 bytes
    - Viewed (0)
  8. docs_src/body_nested_models/tutorial006.py

    from typing import List, Set, Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
        images: Union[List[Image], None] = None
    
    
    @app.put("/items/{item_id}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 530 bytes
    - Viewed (0)
  9. fastapi/security/__init__.py

    from .oauth2 import OAuth2PasswordRequestForm as OAuth2PasswordRequestForm
    from .oauth2 import OAuth2PasswordRequestFormStrict as OAuth2PasswordRequestFormStrict
    from .oauth2 import SecurityScopes as SecurityScopes
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 881 bytes
    - Viewed (0)
  10. docs_src/custom_docs_ui/tutorial002.py

    app = FastAPI(docs_url=None, redoc_url=None)
    
    app.mount("/static", StaticFiles(directory="static"), name="static")
    
    
    @app.get("/docs", include_in_schema=False)
    async def custom_swagger_ui_html():
        return get_swagger_ui_html(
            openapi_url=app.openapi_url,
            title=app.title + " - Swagger UI",
            oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.1K bytes
    - Viewed (0)
Back to top