← back to Blog
2
 min read
January 10, 2018

Introducing the Official Python SDK for the Cronofy Calendar API

According to Stack Overflow, Python is one of the fastest-growing major programming languages. That makes it no surprise that many of you have asked us for a Python SDK. We listened to your feedback and are proud to announce that we’re releasing an officially supported Python SDK for Cronofy.

According to Stack Overflow, Python is one of the fastest-growing major programming languages.

That makes it no surprise that many of you have asked us for a Python SDK.

We listened to your feedback and are proud to announce that we’re releasing an officially supported Python SDK for Cronofy.

We’ve worked with our partners at VenueBook to develop a battle-tested and fully functional SDK.

Show me the code!

Here’s a look at the code you need to create calendar events.

import pycronofy

cronofy = pycronofy.Client(access_token=YOUR_TOKEN)

events = cronofy.read_events()
for event in events:
   print('%s (From %s to %s, %i attending)' %
       (event['summary'], event['start'], event['end'], len(event['attendees'])))

event = {
   'event_id': 'event_test_12345679',
   'summary': 'Test Event',
   'description': 'example description',
   'start': "2018-01-17T12:00:00Z",
   'end': "2018-01-17T12:30:00Z",
   'location': {
       'description': 'My Desk!',
   },
}

calendar = cronofy.list_calendars()
cal = calendar[0]

cronofy.upsert_event(calendar_id=cal['calendar_id'], event=event)

If you have a developer account, the code examples are available to you on the developer dashboard.

FAQ

Where can I get the SDK?

You can find the code on Github and the packages on PyPI.

Do you support Python 2 or 3?

We support both Python 2 and 3.

How do I contribute?

If you have any feedback on our Python SDK, or there’s something you’d like to see us add to it, we want to know! Drop us an email at support@cronofy.com.

Where do I report issues?

Drop us an email at support@cronofy.com or raise an issue on the Github repo.

How do I access the EU data center?

You can configure the client to set the desired data center like so:

class="language-python">cronofy = pycronofy.Client(data_center='de')

Want more code examples?

We also have SDKs for .Net, Node.js, and PHP.

We also love community contributions, so if you’d like to write some code or develop a brand new Cronofy library, please get in touch!

Adam is CEO and co-founder of Cronofy, the unified calendar API.

Cronofy reviews sourced by G2