- Sort Score
- Num 10 results
- Language All
Results 191 - 200 of 1,421 for defs (0.02 seconds)
-
tests/test_security_http_digest_optional.py
security = HTTPDigest(auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None: return {"msg": "Create an account first"} return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_digest():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Feb 27 12:29:20 GMT 2025 - 2.2K bytes - Click Count (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexerTest.groovy
} def "closes implicit <p> element at start of block element"() { expect: parse(source) == transformed where: source | transformed "text<p>para 2</p>" | "<p>text</p><p>para 2</p>" "text<h2>text</h2>" | "<p>text</p><h2>text</h2>" } def "does not add implicit <p> element for elements with inline content"() {Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 6.5K bytes - Click Count (0) -
docs_src/dependency_testing/tutorial001_an_py39.py
app = FastAPI() async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Click Count (0) -
docs/tr/docs/async.md
Aynısı bağımlılıklar için de geçerlidir. Bir bağımlılık, "async def" yerine standart bir "def" işleviyse, harici iş parçacığı havuzunda çalıştırılır. ### Alt-bağımlıklar
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:56:21 GMT 2025 - 21.8K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py39.py
app = FastAPI() def verify_password(plain_password, hashed_password): return password_hash.verify(plain_password, hashed_password) def get_password_hash(password): return password_hash.hash(password) def get_user(db, username: str): if username in db: user_dict = db[username] return UserInDB(**user_dict) def authenticate_user(fake_db, username: str, password: str):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 4.2K bytes - Click Count (0) -
tests/test_tutorial/test_dependencies/test_tutorial012.py
params=[ pytest.param("tutorial012_py39"), pytest.param("tutorial012_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dependencies.{request.param}") client = TestClient(mod.app) return client def test_get_no_headers_items(client: TestClient): response = client.get("/items/")Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 7.7K bytes - Click Count (0) -
tests/test_tutorial/test_security/test_tutorial003.py
pytest.param("tutorial003_an_py39"), pytest.param("tutorial003_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.security.{request.param}") client = TestClient(mod.app) return client def test_login(client: TestClient): response = client.post("/token", data={"username": "johndoe", "password": "secret"})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 7.7K bytes - Click Count (0) -
docs/ru/docs/async.md
```Python hl_lines="1" async def get_burgers(number: int): # Сделать что-то асинхронное, чтобы приготовить бургеры return burgers ``` ...вместо `def`: ```Python hl_lines="2" # Это не асинхронный код def get_sequential_burgers(number: int): # Сделать что-то последовательное, чтобы приготовить бургеры
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 38.5K bytes - Click Count (0) -
compat/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
ArtifactDescriptorResult result = system.readArtifactDescriptor(session, request); List<Dependency> deps = result.getDependencies(); assertEquals(2, deps.size()); checkUtSimpleArtifactDependencies(deps.get(0), deps.get(1)); } /** * check ut.simple:artifact:1.0 dependencies */Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Sep 17 10:01:14 GMT 2025 - 9.5K bytes - Click Count (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial006c.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module( f"docs_src.query_params_str_validations.{request.param}" ) client = TestClient(mod.app) return client @pytest.mark.xfail( reason="Code example is not valid. See https://github.com/fastapi/fastapi/issues/12419" ) def test_query_params_str_validations_no_query(client: TestClient):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 5K bytes - Click Count (0)