Skip to main content

Intertec TimePro Utils

PyPI version Build status Coverage Python versions Github license

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()

Metadata

Release files for timepro-timesheet 19.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timepro-timesheet 19.2.1
File Size Uploaded Provenance Actions
timepro-timesheet-19.2.1.tar.gz 11.5 kB Without provenance Details for timepro-timesheet-19.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for timepro-timesheet 19.2.1
File Interpreter ABI Platform Actions
timepro_timesheet-19.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for timepro_timesheet-19.2.1-py2.py3-none-any.whl

Total release size: 23.1 kB

Release files / timepro-timesheet-19.2.1.tar.gz

Download URL timepro-timesheet-19.2.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9ff6b4533d2bfece7e2df35524df9b5ea9544c541f7a14e9732202f16ff60838
BLAKE2b-256 checksum
How to use checksums
357493082f072bbb2b11233dbfb8765df67bb82b2ea5a26dc25beb57928f09c6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / timepro_timesheet-19.2.1-py2.py3-none-any.whl

Download URL timepro_timesheet-19.2.1-py2.py3-none-any.whl
Size 11.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5593a1ba284b2aaadb71980d9c9d5782224d46072d13eceb792445d9aa05be7e
BLAKE2b-256 checksum
How to use checksums
15ff4ad31be79081643802bb3f20d8f87515aeead40e4d832f8f49c5a847b423
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for timepro-timesheet 19.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page