Skip to content

xxv/eventbrite-sdk-python

 
 

Repository files navigation

eventbrite-sdk-python

image

image

image

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

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)

About

Eventbrite Python SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.2%
  • PowerShell 5.0%
  • Makefile 2.6%
  • HTML 2.0%
  • Shell 1.2%