This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

PyToggl

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)

Code:

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

print(users[0].name)

Output:

John Smith

Code:

# The repr is very useful for debugging.
print(users[0])

Output:

class instance>.wid = 12345
class instance>.uid = 543210
class instance>.admin = False
class instance>.avatar_file_name = https://secure.gravatar.com/avatar/87vh8r7h8er7ch8wd7ch9wd7cj9wr7h?d=404&s=200
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 = johnsmith@notarealdomain.com
class instance>.name = John Smith

Code:

# All objects have a dict property.
print(users[0].dict)

Output:

{'active': True,
'admin': False,
'at': u'2014-09-26T17:54:54+00:00',
'avatar_file_name': u'https://secure.gravatar.com/avatar/87vh8r7h8er7ch8wd7ch9wd7cj9wr7h?d=404&s=200',
'email': u'johnsmith@notarealdomain.com',
'group_ids': [345678],
'id': 987656789,
'inactive': False,
'name': u'John Smith',
'uid': 543210,
'wid': 12345}

Code:

# All objects also have a json property
print(users[0].json)

Output:

'{"wid": 12345, "uid": 543210, "avatar_file_name": "https://secure.gravatar.com/avatar/87vh8r7h8er7ch8wd7ch9wd7cj9wr7h?d=404&s=200", "inactive": false, "at": "2014-09-26T17:54:54+00:00", "active": true, "id": 987656789, "group_ids": [345678], "name": "John Smith", "admin": false, "email": "johnsmith@notarealdomain.com"}'

CHANGES

Version 0.1.0 - 02 October 2014

  • Alpha version
Release History

Release History

0.2.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyToggl-0.2.6.tar.gz (6.1 kB) Copy SHA256 Checksum SHA256 Source Oct 6, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting