- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for Schack (0.16 sec)
-
docs_src/security/tutorial003_an_py39.py
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: Annotated[str, Depends(oauth2_scheme)]): user = fake_decode_token(token) if not user:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 2.5K bytes - Viewed (0) -
tests/test_response_by_alias.py
"response_model_by_alias=False is basically a quick hack, to support " "proper OpenAPI use another model with the correct field names" ) } ) else: class Config: schema_extra = { "description": ( "response_model_by_alias=False is basically a quick hack, to support "
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 11.1K bytes - Viewed (0) -
fastapi/utils.py
except (RuntimeError, PydanticSchemaGenerationError): raise fastapi.exceptions.FastAPIError( "Invalid args for response field! Hint: " f"check that {type_} is a valid Pydantic field type. " "If you are using a return type annotation that is not a valid Pydantic " "field (e.g. Union[Response, dict, None]) you can disable generating the "
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
user_data = response.json() item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] assert item_to_check["title"] == item["title"] assert item_to_check["description"] == item["description"] response = client.get("/users/1") assert response.status_code == 200, response.text user_data = response.json() item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
.github/actions/people/app/main.py
subprocess.run(["git", "config", "user.name", "github-actions"], check=True) subprocess.run( ["git", "config", "user.email", "******@****.***"], check=True ) branch_name = "fastapi-people" logging.info(f"Creating a new branch {branch_name}") subprocess.run(["git", "checkout", "-b", branch_name], check=True) logging.info("Adding updated file") subprocess.run(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
docs_src/dependencies/tutorial011_an_py39.py
if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/") async def read_query_check(fixed_content_included: Annotated[bool, Depends(checker)]):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 544 bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases.py
response = client.get("/users/1") assert response.status_code == 200, response.text user_data = response.json() item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] assert item_to_check["title"] == item["title"] assert item_to_check["description"] == item["description"] # TODO: pv2 add Pydantic v2 version @needs_pydanticv1 def test_read_items(client):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.1K bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
lang = label[5:] lang_to_discussion_map[lang] = discussion logging.debug(f"Using translations map: {lang_to_discussion_map}") # Messages to create or check new_translation_message = f"Good news everyone! 😉 There's a new translation PR to be reviewed: #{pr.number} by @{pr.user.login}. 🎉 This requires 2 approvals from native speakers to be merged. 🤓"
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Sep 27 23:01:46 GMT 2023 - 12.4K bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
import gzip import json import pytest from fastapi import Request from fastapi.testclient import TestClient from docs_src.custom_request_and_route.tutorial001 import app @app.get("/check-class") async def check_gzip_request(request: Request): return {"request_class": type(request).__name__} client = TestClient(app) @pytest.mark.parametrize("compress", [True, False]) def test_gzip_request(compress):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Nov 13 14:26:09 GMT 2022 - 886 bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py
user_data = response.json() item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0] assert item_to_check["title"] == item["title"] assert item_to_check["description"] == item["description"] response = client.get("/users/1") assert response.status_code == 200, response.text user_data = response.json() item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0)