- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for generator (0.56 sec)
-
tests/test_dependency_class.py
from typing import AsyncGenerator, Generator import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient app = FastAPI() class CallableDependency: def __call__(self, value: str) -> str: return value class CallableGenDependency: def __call__(self, value: str) -> Generator[str, None, None]: yield value class AsyncCallableDependency:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 10:54:05 GMT 2020 - 3.3K bytes - Viewed (0) -
fastapi/param_functions.py
It will affect the generated OpenAPI (e.g. visible at `/docs`). """ ), ] = None, include_in_schema: Annotated[ bool, Doc( """ To include (or not) this parameter field in the generated OpenAPI. You probably don't need it, but it's available. This affects the generated OpenAPI (e.g. visible at `/docs`).
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
fastapi/security/http.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 15:29:38 GMT 2024 - 13.2K bytes - Viewed (0) -
fastapi/security/oauth2.py
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) -
fastapi/utils.py
new_field.populate_validators() # type: ignore[attr-defined] return new_field def generate_operation_id_for_path( *, name: str, path: str, method: str ) -> str: # pragma: nocover warnings.warn( "fastapi.utils.generate_operation_id_for_path() was deprecated, " "it is not used internally, and will be removed soon", DeprecationWarning,
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) -
fastapi/openapi/utils.py
model_name_map = get_compat_model_name_map(all_fields) schema_generator = GenerateJsonSchema(ref_template=REF_TEMPLATE) field_mapping, definitions = get_definitions( fields=all_fields, schema_generator=schema_generator, model_name_map=model_name_map, separate_input_output_schemas=separate_input_output_schemas, )
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) -
docs_src/dependencies/tutorial009.py
async def dependency_a(): dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a=Depends(dependency_a)): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b=Depends(dependency_b)): dep_c = generate_dep_c() try: yield dep_c finally:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 455 bytes - Viewed (0) -
docs_src/custom_response/tutorial004.py
from fastapi import FastAPI from fastapi.responses import HTMLResponse app = FastAPI() def generate_html_response(): html_content = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse(content=html_content, status_code=200)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 491 bytes - Viewed (0) -
fastapi/dependencies/models.py
self.security_scopes_param_name = security_scopes_param_name self.name = name self.call = call self.use_cache = use_cache # Store the path to be able to re-generate a dependable from it in overrides self.path = path # Save the cache key at creation to optimize performance
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2.4K bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
if not langs or lang_all_label not in label_strs: logging.info(f"PR #{pr.number} doesn't seem to be a translation PR, skipping") sys.exit(0) # Generate translation map, lang ID to discussion discussions = get_graphql_translation_discussions(settings=settings) lang_to_discussion_map: Dict[str, AllDiscussionsDiscussionNode] = {} for discussion in discussions:
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)