- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 62 for Ball (0.12 sec)
-
docs_src/sql_databases/sql_app_py310/alt_main.py
from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() @app.middleware("http") async def db_session_middleware(request: Request, call_next): response = Response("Internal server error", status_code=500) try: request.state.db = SessionLocal() response = await call_next(request) finally: request.state.db.close() return response
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.9K bytes - Viewed (0) -
docs_src/sql_databases/sql_app/alt_main.py
from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() @app.middleware("http") async def db_session_middleware(request: Request, call_next): response = Response("Internal server error", status_code=500) try: request.state.db = SessionLocal() response = await call_next(request) finally: request.state.db.close() return response
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1.9K bytes - Viewed (0) -
docs_src/sql_databases/sql_app/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 May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1K bytes - Viewed (0) -
docs_src/async_sql_databases/tutorial001.py
sqlalchemy.Column("completed", sqlalchemy.Boolean), ) engine = sqlalchemy.create_engine( DATABASE_URL, connect_args={"check_same_thread": False} ) metadata.create_all(engine) class NoteIn(BaseModel): text: str completed: bool class Note(BaseModel): id: int text: str completed: bool app = FastAPI()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1.4K bytes - Viewed (0) -
bin/diff_yaml.py
def normalize(rl, args): for i in range(len(rl)): rl[i] = normalize_res(rl[i], args) return rl def compare(args): j0 = normalize(list(yaml.safe_load_all(open(args.orig))), args) j1 = normalize(list(yaml.safe_load_all(open(args.new))), args) q0 = {by_resource_name(res): res for res in j0 if res is not None} q1 = {by_resource_name(res): res for res in j1 if res is not None}
Python - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Wed Mar 03 16:14:57 GMT 2021 - 4.5K bytes - Viewed (0) -
fastapi/background.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 1.7K bytes - Viewed (0) -
ci/official/wheel_test/test_import_api_packages.py
# Copyright 2023 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 30 12:39:09 GMT 2024 - Last Modified: Wed Sep 13 15:52:07 GMT 2023 - 3.3K bytes - Viewed (0) -
fastapi/security/open_id_connect_url.py
openIdConnectUrl=openIdConnectUrl, description=description ) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error async def __call__(self, request: Request) -> Optional[str]: authorization = request.headers.get("Authorization") if not authorization: if self.auto_error: raise HTTPException(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 2.7K bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Aug 25 21:44:40 GMT 2022 - 2.8K bytes - Viewed (0) -
docs_src/extra_models/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 644 bytes - Viewed (1)