Skip to main content

The Definitive Python Library For The Toggl API

Project description


The definitive Toggl library for Python.

Currently this library supports all API calls via the self.query and the self.query_report methods. They return the JSON that is documented in the Toggl API documentation.

In addition to the query methods, this library contains quite a few helpful methods and classes for working with Toggl data.

How To Use / Examples

Initialize the Library

from PyToggl import PyToggl
pytoggl = PyToggl('YOUR-API-KEY-HERE')

# Wasn't that easy?

Now do something with it.

# Grab our workspace(s)
workspaces = pytoggl.get_workspaces()

# Now grab all our users for the first workspace
users = pytoggl.get_workspace_users(workspaces[0].id)


# PyToggl creates objects out of all your query results that use the
# helper methods (ie. get_workspaces and get_workspace_users)



John Smith


# The repr is very useful for debugging.


class instance>.wid = 12345
class instance>.uid = 543210
class instance>.admin = False
class instance>.avatar_file_name =
class instance>.id = 987656789
class instance>.inactive = False
class instance>.at = 2014-09-26T17:54:54+00:00
class instance>.active = True
class instance>.group_ids = [345678]
class instance>.email =
class instance>.name = John Smith


# All objects have a dict property.


{'active': True,
'admin': False,
'at': u'2014-09-26T17:54:54+00:00',
'avatar_file_name': u'',
'email': u'',
'group_ids': [345678],
'id': 987656789,
'inactive': False,
'name': u'John Smith',
'uid': 543210,
'wid': 12345}


# All objects also have a json property


'{"wid": 12345, "uid": 543210, "avatar_file_name": "", "inactive": false, "at": "2014-09-26T17:54:54+00:00", "active": true, "id": 987656789, "group_ids": [345678], "name": "John Smith", "admin": false, "email": ""}'


Version 0.1.0 - 02 October 2014

  • Alpha version

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyToggl, version 0.2.6
Filename, size File type Python version Upload date Hashes
Filename, size PyToggl-0.2.6.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page