Starlette-context

Latest version: v0.3.6

Safety actively analyzes 621724 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.3.6

* fix for being unable to catch some exceptions with a try/except due to base exc inheriting from the `BaseException` (Thanks soundstripe) https://github.com/tomwojcik/starlette-context/issues/90
* minimal Python version required is now 3.8

0.3.5

- fix for accessing the context in error handlers (Thanks hhamana) https://github.com/tomwojcik/starlette-context/issues/74

0.3.4

- add ``request_cycle_context``. It’s a context manager that allows for easier testing and cleaner code (Thanks hhamana) https://github.com/tomwojcik/starlette-context/issues/46
- fix for accessing context during logging, outside of the request-response cycle. Technically it should raise an exception, but it makes sense to include the context by default (in logs) and if it’s not available, some logs are better than no logs. Now it will show context data if context is available, with a fallback to an empty dict (instead of raising an exc) https://github.com/tomwojcik/starlette-context/issues/65
- add ``ContextMiddleware`` deprecation warning
- ``**context`` context unpacking seems to be working now

0.3.3

* add support for custom error responses if error occurred in plugin / middleware -> fix for 500 (Thanks hhamana)
* better (custom) exceptions with a base `StarletteContextError` (Thanks hhamana)

0.3.2

* ``ContextDoesNotExistError`` is raised when context object can't be accessed. Previously it was ``RuntimeError``.
For backwards compatibility, it inherits from ``RuntimeError`` so it shouldn't result in any regressions.
* Added ``py.typed`` file so your mypy should never complain

0.3.1

- add ApiKeyPlugin plugin for X-API-Key header

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.