Official Eventbrite SDK for Python
- Official Eventbrite SDK for Python
- Free software: Apache 2 license
- Full Documentation: http://eventbrite-sdk-python.readthedocs.org/
- API Reference: https://developer.eventbrite.com/docs/
Installation from PyPI
$ pip install eventbrite
If you need to, you can also use easy_install:
$ easy_install eventbrite
The Eventbrite Python SDK makes it trivial to interact with the Eventbrite API:
>>> from eventbrite import Eventbrite >>> eventbrite = Eventbrite('my-oauth-token') >>> user = eventbrite.get_user() # Not passing an argument returns yourself >>> user['id'] 1234567890 >>> user['name'] Daniel Roy Greenfeld
You can also specify API endpoints manually:
>>> user = eventbrite.get('/users/me') >>> user['id'] 1234567890 >>> user['name'] Daniel Roy Greenfeld
Expansions can be included in a returned GET resource by simply adding the expand keyword to the calling method:
>>> event = eventbrite.get_event('my-event-id') >>> 'ticket_classes' in evbobject False >>> event = eventbrite.get_event('my-event-id', expand='ticket_classes') >>> 'ticket_classes' in evbobject True
Usage with Frameworks
When using Flask, you can convert incoming webhook requests into Eventbrite API objects using the webhook_to_object() method:
@app.route('/webhook', methods=['POST']) def webhook(): # Use the API client to convert from a webhook to an API object api_object = eventbrite.webhook_to_object(request) # Process the API object if api_object.type == 'User': do_user_process(api_object) if api_object.type == 'Event': do_event_process(api_object) return ""
Because this client interacts with Eventbrite’s third API (a.k.a. APIv3), we are tying our release numbers against it in a modified-semantic system:
- 3.x.x where ‘3’ matches the API version. This will not change until Eventbrite releases a new API version.
- x.0.x where ‘0’ is increased any time there is a significant change to the API that possibly breaks backwards compatibility
- x.x.1 where ‘1’ is increased on any release that does not break backwards comptability (small, new features, enhancements, bugfixes)
- Added 3 new user endpoints, thanks to @jon-ga (#29)
- GET /users/:id/events/
- GET /users/:id/venues/
- GET /users/:id/organizers/
- Removed type mapping as it added unnecessary complexity preventing easy management of paginated responses.
- Enabled webhooks
- Fixed ticket definitions in Event creation test
- Set input variable using input argument thanks to Bill So (#27).
- Added new publish and unpublish methods thanks to Ryan Bagwell.
- Eventbrite client now accepts an eventbrite_api_url argument.
- Added control over expansion of response. Documentation at http://www.eventbrite.com/developer/v3/reference/expansions/
- Removed ‘content-type’ header from all GET requests. Thank you @xxv for identifying the problem and contributing code.
- Resolved the search result response problem where filtering did not work.
- Fixed import issue with __version__. Thank you @meshy and @longjos for identifying the problem.
- Event creation now working.
- Added feature allowing the use of Eventbrite API url at test servers. Should expedite development of tricky post actions.
- Added reverse mapping for get_event_ticket_class() method.
- Added events mapping to provide GET access to the Event endpoint.
- Removed several deprecated JSON mappings.
- Initial release of 3.0.0 client
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|eventbrite-3.3.3-py2.py3-none-any.whl (16.2 kB) Copy SHA256 Checksum SHA256||2.7||Wheel||Aug 25, 2015|
|eventbrite-3.3.3.tar.gz (26.6 kB) Copy SHA256 Checksum SHA256||–||Source||Aug 25, 2015|