- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 62 for Sall (0.18 sec)
-
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 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2.4K bytes - Viewed (0) -
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 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
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 28 07:19:10 GMT 2024 - Last Modified: Thu Feb 17 12:40:12 GMT 2022 - 1.5K bytes - Viewed (0) -
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 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 544 bytes - Viewed (0) -
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 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1K bytes - Viewed (0) -
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) -
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 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 638 bytes - Viewed (0) -
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 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 717 bytes - Viewed (0) -
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 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.2K bytes - Viewed (0) -
docs/sts/client_grants/__init__.py
return None def _create_credentials_fetcher(self): method = self.METHOD def fetch_credentials(): # HTTP headers are case insensitive filter out # all duplicate headers and pick one. headers = {} headers['content-type'] = 'application/x-www-form-urlencoded' headers['authorization'] = urllib3.make_headers(
Python - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 23 18:58:53 GMT 2021 - 4.6K bytes - Viewed (1)