- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for append (0.14 sec)
-
tests/test_ws_dependencies.py
def dependency_list() -> List[str]: return [] DepList = Annotated[List[str], Depends(dependency_list)] def create_dependency(name: str): def fun(deps: DepList): deps.append(name) return Depends(fun) router = APIRouter(dependencies=[create_dependency("router")]) prefix_router = APIRouter(dependencies=[create_dependency("prefix_router")])
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 20:35:39 GMT 2023 - 2.1K bytes - Viewed (0) -
fastapi/security/oauth2.py
@app.post("/login") def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]): data = {} data["scopes"] = [] for scope in form_data.scopes: data["scopes"].append(scope) if form_data.client_id: data["client_id"] = form_data.client_id if form_data.client_secret: data["client_secret"] = form_data.client_secret return data ```
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 21.1K bytes - Viewed (1) -
.github/actions/people/app/main.py
sponsors = [] for key in keys: sponsor_group = [] for login, sponsor in tiers[key].items(): sponsor_group.append( {"login": login, "avatarUrl": sponsor.avatarUrl, "url": sponsor.url} ) sponsors.append(sponsor_group) people = { "maintainers": maintainers, "experts": experts, "last_month_experts": last_month_experts,
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) -
.github/actions/notify-translations/app/main.py
settings=settings, discussion_number=discussion_number ) while discussion_edges: for discussion_edge in discussion_edges: comment_nodes.append(discussion_edge.node) last_edge = discussion_edges[-1] discussion_edges = get_graphql_translation_discussion_comments_edges( settings=settings, discussion_number=discussion_number,
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_ws_router.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
fastapi/dependencies/utils.py
if field_info_in == params.ParamTypes.path: dependant.path_params.append(field) elif field_info_in == params.ParamTypes.query: dependant.query_params.append(field) elif field_info_in == params.ParamTypes.header: dependant.header_params.append(field) else: assert ( field_info_in == params.ParamTypes.cookie
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
scripts/docs.py
"update it in docs/language_names.yml" ) raise typer.Abort() use_name = f"{code} - {local_language_names[code]}" new_alternate.append({"link": url, "name": use_name}) new_alternate.append({"link": "/em/", "name": "😉"}) config["extra"]["alternate"] = new_alternate return config def update_config() -> None: config = get_updated_config_content()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1) -
tests/test_datastructures.py
path.write_bytes(b"<file content>") app = FastAPI() testing_file_store: List[UploadFile] = [] @app.post("/uploadfile/") def create_upload_file(file: UploadFile): testing_file_store.append(file) return {"filename": file.filename} client = TestClient(app) with path.open("rb") as file: response = client.post("/uploadfile/", files={"file": file})
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 2K bytes - Viewed (0) -
fastapi/openapi/utils.py
route.body_field, ModelField ), "A request body must be a Pydantic Field" body_fields_from_routes.append(route.body_field) if route.response_field: responses_from_routes.append(route.response_field) if route.response_fields: responses_from_routes.extend(route.response_fields.values()) if route.callbacks:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
except AsyncDependencyError: errors.append("/async_raise") raise finally: state["/async_raise"] = "asyncgen raise finalized" def generator_state_try(state: Dict[str, str] = Depends(get_state)): state["/sync_raise"] = "generator raise started" try: yield state["/sync_raise"] except SyncDependencyError: errors.append("/sync_raise") raise finally:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 11.6K bytes - Viewed (0)