Official Eventbrite SDK for Python
Project description
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
Usage
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 ""
Versioning
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)
History
3.1.0 (2014-05-11)
Added control over expansion of response. Documentation at http://www.eventbrite.com/developer/v3/reference/expansions/
3.0.5 (2014-04-24)
Removed ‘content-type’ header from all GET requests. Thank you @xxv for identifying the problem and contributing code.
3.0.4 (2014-03-12)
Resolved the search result response problem where filtering did not work.
3.0.3 (2014-03-02)
Fixed import issue with __version__. Thank you @meshy and @longjos for identifying the problem.
3.0.2 (2014-01-30)
Event creation now working.
Added feature allowing the use of Eventbrite API url at test servers. Should expedite development of tricky post actions.
3.0.1 (2014-01-30)
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.
3.0.0 (2014-01-28)
Initial release of 3.0.0 client
3.0.0-alpha (2014-12-05)
Inception
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file eventbrite-3.1.0.tar.gz
.
File metadata
- Download URL: eventbrite-3.1.0.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7ec6521ac9656fc90240bcd3dd20499e1eb2eff3fdcdfd0b475864b1d910e2c |
|
MD5 | bb756c8bc1e5c4a4bcaddc475821ffa5 |
|
BLAKE2b-256 | 055cf44b144a23f7bb64776f5edd93bce7be783b440c20a4b5f9e1ddf1108cce |
File details
Details for the file eventbrite-3.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: eventbrite-3.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb30808cb925e0623fbe8a08ddf604901abfe13476602805084f00083bd48ba4 |
|
MD5 | 711a15e4cf18474933c9b46d90e080da |
|
BLAKE2b-256 | 1e0051d2e9bff587fc0ae99802acc3723798fe7ffd7c5247d79bb5f67b2c242a |