- Sort Score
- Num 10 results
- Language All
Results 131 - 140 of 1,421 for defs (0.03 seconds)
-
docs_src/sql_databases/tutorial001_py310.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 app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.7K bytes - Click Count (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/ClassDocRendererTest.groovy
def propertiesSection = withCategories { content.section.find { it.title[0].text().trim() == 'Properties' } } def propertyDetailsSection = withCategories { content.section.find { it.title[0].text().trim() == 'Property details' } } def propertiesTable = withCategories { propertiesSection ? propertiesSection.table[0] : parse('<table/>')}Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 40.8K bytes - Click Count (0) -
configure.py
class UserInputError(Exception): pass def is_windows(): return platform.system() == 'Windows' def is_linux(): return platform.system() == 'Linux' def is_macos(): return platform.system() == 'Darwin' def is_ppc64le(): return platform.machine() == 'ppc64le' def is_s390x(): return platform.machine() == 's390x' def is_cygwin():
Created: Tue Dec 30 12:39:10 GMT 2025 - Last Modified: Wed Apr 30 15:18:54 GMT 2025 - 48.3K bytes - Click Count (0) -
tests/test_request_params/test_header/test_required_str.py
# Without aliases @app.get("/required-str") async def read_required_str(p: Annotated[str, Header()]): return {"p": p} class HeaderModelRequiredStr(BaseModel): p: str @app.get("/model-required-str") async def read_model_required_str(p: Annotated[HeaderModelRequiredStr, Header()]): return {"p": p.p} @pytest.mark.parametrize(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 10K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPackagingRegistry.java
List<Dependency> deps = new ArrayList<>(); Plugin existing = plugins.get(key); if (existing != null) { if (version == null) { version = existing.getVersion(); } execs.addAll(existing.getExecutions()); deps.addAll(existing.getDependencies()); }
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Jan 24 17:29:44 GMT 2025 - 7.8K bytes - Click Count (0) -
tests/test_serialize_response_model.py
owner_ids: Optional[list[int]] = None @app.get("/items/valid", response_model=Item) def get_valid(): return Item(aliased_name="valid", price=1.0) @app.get("/items/coerce", response_model=Item) def get_coerce(): return Item(aliased_name="coerce", price="1.0") @app.get("/items/validlist", response_model=list[Item]) def get_validlist(): return [ Item(aliased_name="foo"),
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 4.2K bytes - Click Count (0) -
tests/test_validate_response.py
owner_ids: Optional[list[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid(): return {"name": "invalid", "price": "foo"} @app.get("/items/invalidnone", response_model=Item) def get_invalid_none(): return None @app.get("/items/validnone", response_model=Union[Item, None]) def get_valid_none(send_none: bool = False): if send_none: return None else:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2K bytes - Click Count (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild.binary-compatibility.gradle
// is the "main" one that is also shown in HTML report def apiChangesJsonDirectory = layout.projectDirectory.dir("src/changes/accepted-changes") def compatibilityBaselineVersion = gradleModule.identity.releasedVersions.get().mostRecentRelease.version def ARTIFACT_TYPE = Attribute.of('artifactType', String) def RUNTIME_ATTRIBUTE = objects.named(Usage, Usage.JAVA_RUNTIME) def DOCUMENTATION_ATTRIBUTE = objects.named(Category, Category.DOCUMENTATION)
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Tue Dec 30 10:14:25 GMT 2025 - 8.9K bytes - Click Count (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/BuildableDOMCategory.groovy
public static void addBefore(Element sibling, Node n) { def parent = sibling.parentNode parent.insertBefore(n, sibling) } public static Object addAfter(Element sibling, Closure cl) { DomBuilder builder = new DomBuilder(sibling.ownerDocument, null) cl.delegate = builder cl.call() def parent = sibling.parentNode def next = sibling.nextSibling
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Thu Aug 11 15:32:19 GMT 2022 - 2.8K bytes - Click Count (0) -
docs_src/security/tutorial003_py39.py
class UserInDB(User): hashed_password: str def get_user(db, username: str): if username in db: user_dict = db[username] return UserInDB(**user_dict) def fake_decode_token(token): # This doesn't provide any security at all # Check the next version user = get_user(fake_users_db, token) return user async def get_current_user(token: str = Depends(oauth2_scheme)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.4K bytes - Click Count (0)