Python bindings for your timewarrior database
Project description
timew - Python API for Timewarrior
Installation
For this API to work, you need Timewarrior installed
Installation is easy from the Python Package Index
pip install timew
API Documentation
Examples
>>> from timew import TimeWarrior
>>> timew = TimeWarrior()
>>> timew.start(time=datetime(2018, 8, 15, 9, 0, 0), tags=['my tag'])
Tracking "my tag"
Started 2018-09-06T09:00:00
Current 07T13:20:45
Total 28:20:45
>>> timew.cancel()
Canceled active time tracking.
>>> timew.delete(1)
Deleted @1
>>> timew.join(1, 2)
Joined @1 and @2
>>> from timew import Duration
>>> from datetime import timedelta
>>> timew.lengthen(1, Duration(timedelta(minutes=30)))
Lengthened @1 by 0:30:00
>>> timew.move(1, datetime(2018, 8, 15, 9, 0, 0))
Moved @1 to 2018-09-05T09:00:00
>>> timew.shorten(1, Duration(timedelta(minutes=10)))
Shortened @1 by 0:10:00
>>> timew.split(1)
Split @1
>>> timew.start(tags=['my tag'])
Tracking "my tag"
Started 2018-09-07T13:37:00
Current 40:22
Total 0:03:22
>>> timew.stop()
Recorded "my tag"
Started 2018-09-07T13:37:00
Ended 40:53
Total 0:03:53
>>> timew.track(start_time=datetime(2018, 9, 7, 11, 0, 0), end_time=datetime(2018, 9, 7, 12, 0, 0))
Tracking "from 20180907T110000 - 20180907T120000"
Started 2018-09-07T13:42:27
Current 27
Total 0:00:00
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
timew-0.0.21.tar.gz
(5.6 kB
view details)
Built Distribution
timew-0.0.21-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file timew-0.0.21.tar.gz
.
File metadata
- Download URL: timew-0.0.21.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/4.19.23-coreos-r1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84ee7a1cbc9e8f5ff1e476d7027309140a44b6aee43fcac6e27107977f0d3090 |
|
MD5 | 95527f206431269083f67f5fd5085f79 |
|
BLAKE2b-256 | 421ecb1c94766b3e692b57fca9182cd08de5de61164afa7556a480e08c8f6877 |
File details
Details for the file timew-0.0.21-py3-none-any.whl
.
File metadata
- Download URL: timew-0.0.21-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/4.19.23-coreos-r1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ef0935de91adc48cd5dd16d5da3fe1b7dc7c44e2c23213553f0e0534a1757a4 |
|
MD5 | 48e62ccc8f742d89d5aa86003e99701b |
|
BLAKE2b-256 | 99703f0ba95d7737a225819fc4fb9914f7515983fd8639b8ca12d27d8c54c3bf |