This release is a pre-release and may not be stable for production use.
Eventide
Streamlined, no-fuss queue workers for Python.
Overview
Eventide is a streamlined, easy-to-setup framework for building queue workers. It lets you consume messages, schedule messages with cron, handle retries, and manage your worker lifecycle simply and reliably.
Installation
# Base installation
pip install eventide
# Choose a queue provider:
pip install eventide[sqs] # AWS SQS support
pip install eventide[cloudflare] # Cloudflare Queues support
# Optional features:
pip install eventide[cron] # Cron scheduling
pip install eventide[watch] # Dev autoreload
pip install eventide[core] # Installs all optional features (not queue providers)
Quick Start
A minimal Eventide app and handler:
from eventide import Eventide, EventideConfig, Message, SQSQueueConfig
app = Eventide(
config=EventideConfig(
queue=SQSQueueConfig(
region="us-east-1",
url="https://sqs.us-east-1.amazonaws.com/123456789012/my-queue",
buffer_size=10, # internal buffer queue
),
)
)
@app.handler("body.event == 'hello'")
def hello_world(message: Message) -> None:
print("Hello ", message.body.get("content", "World"))
Run:
eventide run -a app:app
# or using autoreload (recommended for development)
eventide run -a app:app --reload
Handlers
Handlers process messages matching JMESPath expressions and can define retry behavior.
Example:
@app.handler(
"body.type == 'email' && body.event == 'send'",
retry_limit=5,
retry_for=[ValueError, TimeoutError],
retry_min_backoff=1.0,
retry_max_backoff=30.0,
)
def send_email(message):
print("Sending email:", message.body)
Scheduled Messages - Cron
You can define functions decorated with @app.cron to schedule the sending of messages.
Each cron function generates and returns the message body that Eventide will automatically enqueue to your configured queue provider at the scheduled time.
Example:
@app.cron("*/5 * * * * *") # every 5 seconds
def send_heartbeat():
return {"type": "heartbeat"}
Run the cron process separately from the worker process:
eventide cron -a app:app
# or using autoreload (recommended for development)
eventide cron -a app:app --reload
Workers and the cron scheduler are independent, allowing you to scale your workers without duplicating scheduled messages.
Lifecycle Hooks
Hooks allow you to react to important lifecycle moments:
@app.on_start
def startup():
print("App is starting")
@app.on_shutdown
def shutdown():
print("App is shutting down")
@app.on_message_failure
def on_failure(message, exc):
print(f"Failed handling {message.id}: {exc}")
Available hooks:
on_starton_shutdownon_message_receivedon_message_successon_message_failure
Queue Providers
Eventide currently has built-in support for:
- AWS SQS
- Cloudflare Queues
More providers will be added over time.
You can also implement custom providers by extending the Queue base class.
License
Metadata
Release files for eventide 0.0.0a16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eventide-0.0.0a16.tar.gz | 72.9 kB | Without provenance | Details for eventide-0.0.0a16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eventide-0.0.0a16-py3-none-any.whl | Python 3 | none | any | Details for eventide-0.0.0a16-py3-none-any.whl |
Total release size: 99.2 kB
Release files / eventide-0.0.0a16.tar.gz
| Download URL | eventide-0.0.0a16.tar.gz |
|---|---|
| Size | 72.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a833649ed1eaf93128ce895d1486eabb1bc2748ffec2bfed9ec24906d0be800a
|
|
BLAKE2b-256 checksum How to use checksums |
c82282823f9ef61d9c384d19ed0cb082764626d2881d31a67d9b53d98ce979d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.16
|
Release files / eventide-0.0.0a16-py3-none-any.whl
| Download URL | eventide-0.0.0a16-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d983cc199f8288e92787cfdd5e300657b05e050d6f15db40a23f711fae395d6
|
|
BLAKE2b-256 checksum How to use checksums |
6a8b0f419b66aa491b63d1f39badbf440c7518273d57ff87e45c48fac89f87e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.16
|
Security for eventide 0.0.0a16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.