- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 1,452 for DEF (0.03 sec)
-
docs_src/sql_databases/tutorial002_an_py39.py
engine = create_engine(sqlite_url, connect_args=connect_args) def create_db_and_tables(): SQLModel.metadata.create_all(engine) def get_session(): with Session(engine) as session: yield session SessionDep = Annotated[Session, Depends(get_session)] app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.5K bytes - Viewed (0) -
scripts/docs.py
build_site_path = Path("site_build").absolute() @lru_cache def is_mkdocs_insiders() -> bool: version = metadata.version("mkdocs-material") return "insiders" in version def get_en_config() -> Dict[str, Any]: return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) def get_lang_paths() -> List[Path]: return sorted(docs_path.iterdir()) def lang_callback(lang: Optional[str]) -> Union[str, None]:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 08 11:01:17 UTC 2024 - 13.5K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/TypeNameResolverTest.groovy
def resolvesFullyQualifiedClassName() { when: def name = typeNameResolver.resolve('org.gradle.SomeClass', classMetaData) then: name == 'org.gradle.SomeClass' _ * classMetaData.innerClassNames >> [] } def resolvesUnqualifiedNameToClassInSamePackage() { when: def name = typeNameResolver.resolve('SomeClass', classMetaData)
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 6K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an.py
engine = create_engine(sqlite_url, connect_args=connect_args) def create_db_and_tables(): SQLModel.metadata.create_all(engine) def get_session(): with Session(engine) as session: yield session SessionDep = Annotated[Session, Depends(get_session)] app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial006_an_py39 import app client = TestClient(app) return client @needs_py39 def test_get_no_headers(client: TestClient): response = client.get("/items/") assert response.status_code == 422, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.3K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/XmlSpecification.groovy
} def formatTree(Closure cl) { withCategories { return formatTree(cl.call()) } } def withCategories(Closure cl) { use(BuildableDOMCategory) { return cl.call() } } def format(Node... nodes) { format(nodes as List) } def formatTree(Node... nodes) { formatTree(nodes as List)
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 4.1K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/model/SimpleClassMetaDataRepositoryTest.groovy
def canAddMetaData() { TestDomainObject value = new TestDomainObject('a') when: repository.put('class', value) then: repository.find('class') == value repository.get('class') == value } def findReturnsNullForUnknownClass() { expect: repository.find('unknown') == null
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Sat Apr 06 02:21:33 UTC 2024 - 3.8K bytes - Viewed (0) -
tests/test_allow_inf_nan_in_enforcing.py
], ) def test_allow_inf_nan_param_default(value: str, code: int): response = client.post(f"/?z={value}") assert response.status_code == code, response.text @pytest.mark.parametrize( "value,code", [ ("-1", 200), ("inf", 422), ("-inf", 422), ("nan", 422), ("0", 200), ("342", 200), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:27:37 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional_description.py
description="OAuth2PasswordBearer security scheme", auto_error=False, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
tests/test_custom_route_class.py
router_a = APIRouter(route_class=APIRouteA) router_b = APIRouter(route_class=APIRouteB) router_c = APIRouter(route_class=APIRouteC) @router_a.get("/") def get_a(): return {"msg": "A"} @router_b.get("/") def get_b(): return {"msg": "B"} @router_c.get("/") def get_c(): return {"msg": "C"} router_b.include_router(router=router_c, prefix="/c") router_a.include_router(router=router_b, prefix="/b")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0)