Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuananh/py-event-ruler
Test EventBridge pattern locally with Python
https://github.com/tuananh/py-event-ruler
Last synced: 12 days ago
JSON representation
Test EventBridge pattern locally with Python
- Host: GitHub
- URL: https://github.com/tuananh/py-event-ruler
- Owner: tuananh
- License: mit
- Created: 2023-12-15T10:47:39.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-22T10:21:30.000Z (11 months ago)
- Last Synced: 2024-10-02T00:39:11.202Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
py-event-ruler
--------------[![PyPI version](https://badge.fury.io/py/event-ruler.svg)](https://badge.fury.io/py/event-ruler)
## Origin
I love EventBridge and their pattern matching.
The AWS SDK has an [API for testing event pattern](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_TestEventPattern.html) with EventBridge sandbox. The problem is that you have to initialize AWS SDK client and make an API call for each test.
In my case, I want to do lots of pattern matching test without being afraid of hitting API rate limit from AWS.
AWS also releases an [open-source version of this pattern matching library in Java](https://github.com/aws/event-ruler) but in my case, I want to use Python because that's what my teammates are familiar with.
## Install
```sh
pip install event-ruler
```## Usage
```python
>>> import event_ruler
>>> event_ruler.test_event_pattern('{"foo":true}', '{"foo":[true]}')
True
```## License
[MIT](./LICENSE)