- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for bond (4.33 sec)
-
docs_src/sql_databases/sql_app_py310/database.py
engine = create_engine( SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 461 bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py
SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db" 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()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.2K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py
SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db" 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()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.2K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/alt_main.py
from fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas 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:
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_py39/database.py
engine = create_engine( SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 461 bytes - Viewed (0) -
docs_src/sql_databases/sql_app/main.py
from typing import List from fastapi import Depends, FastAPI, HTTPException from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() # Dependency def get_db(): db = SessionLocal() try: yield db finally: db.close() @app.post("/users/", response_model=schemas.User)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun May 17 10:14:14 GMT 2020 - 1.6K bytes - Viewed (0) -
fastapi/applications.py
from starlette.routing import BaseRoute from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send from typing_extensions import Annotated, Doc, deprecated AppType = TypeVar("AppType", bound="FastAPI") class FastAPI(Starlette): """ `FastAPI` app class, the main entrypoint to use FastAPI. Read more in the
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/main.py
from fastapi import Depends, FastAPI, HTTPException from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() # Dependency def get_db(): db = SessionLocal() try: yield db finally: db.close() @app.post("/users/", response_model=schemas.User)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.6K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py310/alt_main.py
from fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas 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:
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 fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas 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:
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)