- Sort Score
- Result 10 results
- Languages All
Results 381 - 390 of 527 for setMail (0.05 sec)
-
docs/en/docs/advanced/events.md
## Lifespan You can define this *startup* and *shutdown* logic using the `lifespan` parameter of the `FastAPI` app, and a "context manager" (I'll show you what that is in a second). Let's start with an example and then see it in detail. We create an async function `lifespan()` with `yield` like this: {* ../../docs_src/events/tutorial003.py hl[16,19] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:36:22 UTC 2024 - 7.6K bytes - Viewed (0) -
fastapi/security/oauth2.py
authorization = request.headers.get("Authorization") if not authorization: if self.auto_error: raise HTTPException( status_code=HTTP_403_FORBIDDEN, detail="Not authenticated" ) else: return None return authorization class OAuth2PasswordBearer(OAuth2): """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 23 18:30:18 UTC 2024 - 21.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} @needs_py39 def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_security_api_key_query.py
assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.8K bytes - Viewed (0) -
tests/test_security_http_base_description.py
def test_security_http_base_no_credentials(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 734 bytes - Viewed (0) -
docs/de/docs/how-to/conditional-openapi.md
``` </div> Wenn Sie dann zu den URLs unter `/openapi.json`, `/docs` oder `/redoc` gehen, erhalten Sie lediglich einen `404 Not Found`-Fehler, wie: ```JSON { "detail": "Not Found" }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/BlockDetailRenderer.java
Element section = document.createElement("section"); parent.appendChild(section); section.setAttribute("id", blockDoc.getId()); section.setAttribute("role", "detail"); Element title = document.createElement("title"); section.appendChild(title); Element literal = document.createElement("literal"); title.appendChild(literal);
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 3.7K bytes - Viewed (0) -
docs_src/security/tutorial007_an_py39.py
current_password_bytes, correct_password_bytes ) if not (is_correct_username and is_correct_password): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Incorrect username or password", headers={"WWW-Authenticate": "Basic"}, ) return credentials.username @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_security_http_digest_optional.py
response = client.get( "/users/me", headers={"Authorization": "Other invalidauthorization"} ) assert response.status_code == 403, response.text assert response.json() == {"detail": "Invalid authentication credentials"} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0)