- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for before (0.21 sec)
-
docs_src/response_change_status_code/tutorial001.py
@app.put("/get-or-create-task/{task_id}", status_code=200) def get_or_create_task(task_id: str, response: Response): if task_id not in tasks: tasks[task_id] = "This didn't exist before" response.status_code = status.HTTP_201_CREATED
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 391 bytes - Viewed (0) -
docs/sts/client-grants.py
from client_grants import ClientGrantsCredentialProvider boto3.set_stream_logger('boto3.resources', logging.DEBUG) bc_session = get_session() bc_session.get_component('credential_provider').insert_before( 'env', ClientGrantsCredentialProvider('NZLOOFRSluw9RfIkuHGqfk1HFp4a', '0Z4VTG8uJBSekn42HE40DK9vQb4a'), ) boto3_session = Session(botocore_session=bc_session)
Python - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 23 18:58:53 GMT 2021 - 1.2K bytes - Viewed (0) -
fastapi/dependencies/utils.py
) field_info = value if PYDANTIC_V2: field_info.annotation = type_annotation if depends is not None and depends.dependency is None: # Copy `depends` before mutating it depends = copy(depends) depends.dependency = type_annotation if lenient_issubclass( type_annotation, ( Request, WebSocket,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial003.py
original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: before = time.time() response: Response = await original_route_handler(request) duration = time.time() - before response.headers["X-Response-Time"] = str(duration) print(f"route duration: {duration}") print(f"route response: {response}")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1K bytes - Viewed (0) -
docs/extensions/s3zip/examples/boto3/main.py
region_name='us-east-1') def _add_header(request, **kwargs): request.headers.add_header('x-minio-extract', 'true') event_system = s3.meta.events event_system.register_first('before-sign.s3.*', _add_header) # List zip contents response = s3.list_objects_v2(Bucket="your-bucket", Prefix="path/to/file.zip/") print(response) # Download data.csv stored in the zip file
Python - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Aug 04 21:15:45 GMT 2021 - 771 bytes - Viewed (0) -
tests/test_dependency_contextvars.py
return request_state["user"] client = TestClient(app) def test_dependency_contextvars(): """ Check that custom middlewares don't affect the contextvar context for dependencies. The code before yield and the code after yield should be run in the same contextvar context, so that request_state_context_var.reset(contextvar_token). If they are run in a different context, that raises an error. """
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Feb 17 12:40:12 GMT 2022 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_response_change_status_code/test_tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 09 18:06:12 GMT 2020 - 521 bytes - Viewed (0) -
fastapi/encoders.py
Convert any object to something that can be encoded in JSON. This is used internally by FastAPI to make sure anything you return can be encoded as JSON before it is sent to the client. You can also use it yourself, for example to convert objects before saving them in a database that supports only JSON. Read more about it in the
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 10.8K bytes - Viewed (0) -
tensorflow/api_template_v1.__init__.py
if not hasattr(_current_module, "__path__"): __path__ = [_tf_api_dir] elif _tf_api_dir not in __path__: __path__.append(_tf_api_dir) # Hook external TensorFlow modules. # Import compat before trying to import summary from tensorboard, so that # reexport_tf_summary can get compat from sys.modules. Only needed if using # lazy loading. _current_module.compat.v2 # pylint: disable=pointless-statement
Python - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Jan 23 02:14:00 GMT 2024 - 7.4K bytes - Viewed (0) -
fastapi/openapi/models.py
prefixItems: Optional[List["SchemaOrBool"]] = None # TODO: uncomment and remove below when deprecating Pydantic v1 # It generales a list of schemas for tuples, before prefixItems was available # items: Optional["SchemaOrBool"] = None items: Optional[Union["SchemaOrBool", List["SchemaOrBool"]]] = None contains: Optional["SchemaOrBool"] = None
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 22:49:33 GMT 2024 - 15K bytes - Viewed (1)