Utility for programmatically getting and submitting data to Intertec TimePro (timesheets.com.au)
Project description
Intertec TimePro Utils
Description
Programmatically get and submit timesheet data to Intertec TimePro (timesheets.com.au)
Installation
Install with pip
:
pip install timepro-timesheet
Usage
Command line
GET data
Once installed, you can use the CLI to get your timesheet data as JSON.
$ timepro get -c CUST -u john.doe -p password123
{
"2018-08-04": [
{
"customer_code": "EXAMPLE",
"customer_description": "Example Company Pty Ltd",
"project_code": "EX-123",
"project_psid": "EX-123{:}1",
"project_description": "EXAMPLE - EX-123 - SOW000 - Important Business Stuff - PO 123",
"task_id": null,
"task_description": null,
"hours": 8
}
]
}
You can filter the timesheet period by specifying dates for --start
and --end
, or by using the --this-week
, --this-month
, --last-week
or --last-month
flags. By default, the current week's timesheet entries are returned.
POST data
Data can be submitted by reading from a JSON file.
$ timepro post -c CUST -u john.doe -p password123 -f timesheet_entries.json
or
$ cat timesheet_entries.json | timepro post -c CUST -u john.doe -p password123
Python
from timepro_timesheet.api import TimesheetAPI
# Log into timesheets.com.au via the TimesheetAPI class
api = TimesheetAPI()
api.login(customer_id='CUST', username='john.doe', password='password123')
# Get timesheet (defaults to current month)
timesheet = api.get_timesheet()
# Get timesheet for a given date
timesheet = api.get_timesheet(start_date=date(2018, 6, 1), end_date=date(2018, 6, 25))
# Output timesheet
timesheet.json()
timesheet.row_entries()
timesheet.date_entries()
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 timepro-timesheet-19.2.1.tar.gz
.
File metadata
- Download URL: timepro-timesheet-19.2.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ff6b4533d2bfece7e2df35524df9b5ea9544c541f7a14e9732202f16ff60838 |
|
MD5 | 5751658ac6a77144d6f94d73210ef528 |
|
BLAKE2b-256 | 357493082f072bbb2b11233dbfb8765df67bb82b2ea5a26dc25beb57928f09c6 |
File details
Details for the file timepro_timesheet-19.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: timepro_timesheet-19.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5593a1ba284b2aaadb71980d9c9d5782224d46072d13eceb792445d9aa05be7e |
|
MD5 | 4e3729d5ae174173608cff1cf173c0aa |
|
BLAKE2b-256 | 15ff4ad31be79081643802bb3f20d8f87515aeead40e4d832f8f49c5a847b423 |