Python 2 and 3 implementation of Event Fabric API to send events.
Setup
The library dependes on the Requests HTTP library, install it with:
pip install requests
Usage
see the examples folder for more usage examples
# import the library
>>> import eventfabric as ef
# create a client instance specifying username and password
>>> client = ef.Client("username", "password")
# authenticate, should return True and 200, if not there was an error
>>> client.login()
(True, <Response [200]>)
# create an event instance
# the first parameter is a free form JSON
# value that contains information about the event
# the second is the name of the channel where that event will go to
# the channel is used to subscribe to a stream of events with the same
# channel id
>>> event1 = ef.Event({"name": "Bob", "count": 10}, "my.channel")
# send the event, it should return True and 201, if not there was an error,
# make sure to check for authentication errors on long running agents to
# reauthenticate in case your credentials expire
>>> client.send_event(event1)
(True, <Response [201]>)
Test
python tests/eventfabric_tests.py
License
MIT
Metadata
Release files for eventfabric 0.1.0
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 | |
|---|---|---|---|---|
| eventfabric-0.1.0.tar.gz | 3.1 kB | Without provenance | Details |
Release files / eventfabric-0.1.0.tar.gz
| Download URL | eventfabric-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75856e7536f06c7192984ae3fc1ad4b45e149c15867564ce531014c65a0c9662
|
|
BLAKE2b-256 checksum How to use checksums |
c044a2662556a214be906740b03c7bcdb9f287bc19b5469779b85cda561eb9e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for eventfabric 0.1.0
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.