Releases: operatorequals/eventhive
More APIs for your 🐝🐝🐝 in v0.5.0
Version 0.5.0
is out!
Installation
pip install eventhive==0.5.0
API Additions
-
eventhive.register
Theeventhive.register(event, function)
can now register any function to any specific event. It has the same effect witheventhive.hook
decorator, but can be used with function objects, not only with function definitions. -
eventhive.hook
Theeventhive.hook(event)
decorator now automatically adds theevent
str
orlist
to theeventhive.EVENTS
. -
eventhive.init(required=[])
Theeventhive.init
now has therequired
keyword parameter. If a Connector is required for theeventhive
application to work,
its name can be appended in this list andeventhive.init
will fail if the Connector fails to get initialized.
Bug Fixes
- Now the
server.<server_name>.endpoint
now works and is not hardcoded to/pubsub
.
Attracting Bees to EventHive!
Eventhive 0.4.0
is out!
pip install eventhive==0.4.0 # for the standard FastAPI backend
pip install eventhive[redis]==0.4.0 # for the Redis backend
pip install eventhive[dev]==0.4.0 # for the tests
Huge changes since the last release, moving eventhive
closer to a stable version!
Highlights of the changes:
Service Discovery
If there is an already running Eventhive Server in the Local Network with server.<server_name>.broadcast: true
in the Configuration,
then other Eventhive processes with connectors.<connector_name>.from_broadcast: true
will automatically connect to the server (if connector_name
= server_name
). No need to specify initialization parameters (IPs, ports, etc). It's all provided by the Server broadcast.
Encryption and Signing
All messages are automatically encrypted and signed if connectors.<connector_name>.secret
in the Configuration is set to any string value! That's application level encryption, totally transparent to the API. No code changes - just setting the secret
does the job!
Create a Server - if needed
Any Eventhive process can create an Eventhive Server only if it doesn't find one in the network (through Service Discovery)! The server.<server_name>.create
Configuration key accepts the needed
(other values always
, never
). Tag along with server.<server_name>.broadcast: true
to create an eventhive
cluster with auto-promote!
*Bzzt* *Bzzt* - Eventhive is here!
Do your PubSub communications like a Beehive!
Gather your Bees, split them in groups, define what they do, and command them like a Queen Bee!
Use your code both as a PubSub server and client, enable auto-discovery for bees to find their beehive,
or use an external system as your Beehive (Redis currently supported, more to come).
Go ahead! Get your 🐝🐝🐝 to work!
pip install eventhive
Redis support:
pip install eventhive[redis]
To develop / run the tests:
pip install eventhive[redis,dev]