Skip to content

Commit

Permalink
Check emmett version, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Oct 13, 2024
1 parent e5ab475 commit efbd977
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Emmett-Sentry is an [Emmett framework](https://emmett.sh) extension integrating [Sentry](https://sentry.io) monitoring platform.

Emmett-Sentry is compatible both with Emmett and Emmett55.

## Installation

You can install Emmett-Sentry using pip:
Expand Down Expand Up @@ -37,6 +39,7 @@ Here is the complete list of parameters of the extension configuration:
| trace\_sessions | `True` | Enable tracing on sessions load/store |
| trace\_cache | `True` | Enable tracing on cache get/set |
| trace\_pipes | `False` | Enable tracing on pipes |
| sdk\_opts | `{}` | Additional configuration for the Sentry SDK |

## Usage

Expand Down
8 changes: 8 additions & 0 deletions emmett_sentry/_imports.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
try:
from emmett.__version__ import __version__

_major, _minor, _ = __version__.split(".")
if _major < 2 or (_major == 2 and _minor < 6):
from .__version__ import __version__ as extver

raise RuntimeError(f"Emmett-Sentry {extver} requires Emmett >= 2.6.0")

from emmett import current
from emmett.extensions import Extension, Signals, listen_signal

Expand Down

0 comments on commit efbd977

Please sign in to comment.