Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

eventfabric is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1.0 Failed View build log
0.1.0 Failed View build log
 
Links
License
MIT License
Dependencies
Lastest release
version 0.1.0 on Sep 20th, 2013

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

Subscribe to package updates

Last updated Sep 20th, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.