Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for Ball (0.17 sec)

  1. fastapi/dependencies/models.py

            self.name = name
            self.call = call
            self.use_cache = use_cache
            # Store the path to be able to re-generate a dependable from it in overrides
            self.path = path
            # Save the cache key at creation to optimize performance
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  2. tests/test_ws_router.py

                    return await app(scope, receive, send)  # pragma: no cover
    
                async def call_next():
                    return await app(scope, receive, send)
    
                websocket = WebSocket(scope, receive=receive, send=send)
                return await middleware_func(websocket, call_next)
    
            return wrapped_app
    
        return middleware_constructor
    
    
    def test_depend_validation():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  3. tests/test_dependency_contextvars.py

        yield request_state
        legacy_request_state_context_var.reset(contextvar_token)
    
    
    @app.middleware("http")
    async def custom_middleware(
        request: Request, call_next: Callable[[Request], Awaitable[Response]]
    ):
        response = await call_next(request)
        response.headers["custom"] = "foo"
        return response
    
    
    @app.get("/user", dependencies=[Depends(set_up_request_state_dependency)])
    def get_user():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  4. .github/actions/notify-translations/app/main.py

    from pydantic import BaseModel, BaseSettings, SecretStr
    
    awaiting_label = "awaiting-review"
    lang_all_label = "lang-all"
    approved_label = "approved-2"
    translations_path = Path(__file__).parent / "translations.yml"
    
    github_graphql_url = "https://api.github.com/graphql"
    questions_translations_category_id = "DIC_kwDOCZduT84CT5P9"
    
    all_discussions_query = """
    query Q($category_id: ID) {
      repository(name: "fastapi", owner: "tiangolo") {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial011_an_py39.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    class FixedContentQueryChecker:
        def __init__(self, fixed_content: str):
            self.fixed_content = fixed_content
    
        def __call__(self, q: str = ""):
            if q:
                return self.fixed_content in q
            return False
    
    
    checker = FixedContentQueryChecker("bar")
    
    
    @app.get("/query-checker/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 544 bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app_py310/crud.py

        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()
    
    
    def create_user(db: Session, user: schemas.UserCreate):
        fake_hashed_password = user.password + "notreallyhashed"
        db_user = models.User(email=user.email, hashed_password=fake_hashed_password)
        db.add(db_user)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1K bytes
    - Viewed (0)
  7. tensorflow/api_template.__init__.py

    # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
  8. docs_src/path_operation_configuration/tutorial004_py310.py

        price: float
        tax: float | None = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, summary="Create an item")
    async def create_item(item: Item):
        """
        Create an item with all the information:
    
        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
        - **tax**: if the item doesn't have tax, you can omit this
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 638 bytes
    - Viewed (0)
  9. docs_src/path_operation_advanced_configuration/tutorial004.py

        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post("/items/", response_model=Item, summary="Create an item")
    async def create_item(item: Item):
        """
        Create an item with all the information:
    
        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
        - **tax**: if the item doesn't have tax, you can omit this
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 717 bytes
    - Viewed (0)
  10. docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py

    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    
    Base.metadata.create_all(bind=engine)
    
    
    def override_get_db():
        try:
            db = TestingSessionLocal()
            yield db
        finally:
            db.close()
    
    
    app.dependency_overrides[get_db] = override_get_db
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.2K bytes
    - Viewed (0)
Back to top