tempo-api-python-client
Python bindings for Tempo Rest API.
This is a Tempo API client library to simplify the interaction with Tempo timesheets. The implementation supports Tempo API v3 and v4.
Pip release is available: https://pypi.org/project/tempo-api-python-client/
Tempo Rest API documentation can be found at https://apidocs.tempo.io/
Installation
Install current release by pip
pip install tempo-api-python-client
Getting Started
You need an API token for communicating with tempo REST APIs.
For v3 use
from tempoapiclient import client_v3
tempo = client_v3.Tempo(
auth_token="<your_tempo_api_key>",
)
worklogs = tempo.get_worklogs(
dateFrom="2019-11-10",
dateTo="2019-11-11"
)
for i in worklogs:
print(i)
For v4 use
from tempoapiclient import client_v4
tempo = client_v4.Tempo(
auth_token="<your_tempo_api_key>",
)
Retrieve Worklogs
worklogs = tempo.get_worklogs(
dateFrom="2019-11-10",
dateTo="2019-11-11"
)
for i in worklogs:
print(i)
There are also functions to retrieve user and team-specific worklogs.
Create Worklog
logged_worklog = tempo.create_worklog(
accountId="<your_jira_account_id>",
issueId=12345,
dateFrom="2019-11-11",
timeSpentSeconds=3600,
description="Something",
startTime="17:00:00"
attributes=[{_WorkType_: "Development"}]
)
Update Worklog
logged_worklog = tempo.update_worklog(
id="<id_of_the_worklog_to_be_updated>" # required
accountId="<your_jira_account_id>", # required
dateFrom="2019-11-11", # required
timeSpentSeconds=3600, # required
description="Something", # optional
startTime="17:00:00" # optional
)
Delete Worklog
delete_response = tempo.delete_worklog(<worklog_id>)
Code Format
-
Flake8:
flake8 --max-line-length=120 tempoapiclient/* -
Pylint:
pylint --max-line-length=120 tempoapiclient
Contributing
Contribution is welcome. See CONTRIBUTING.md for more details.
Metadata
Release files for tempo-api-python-client 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tempo_api_python_client-0.12.0.tar.gz | 14.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tempo_api_python_client-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.7 kB
Release files / tempo_api_python_client-0.12.0.tar.gz
| Download URL | tempo_api_python_client-0.12.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04ae196ba4c46609c326e676c06959d665e94b7083a6b0ed7c9899a447723c00
|
|
BLAKE2b-256 checksum How to use checksums |
6de2f1201899641b30aec10c31c48d72490fc7dd10ef04373d731d6c2c6915e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / tempo_api_python_client-0.12.0-py3-none-any.whl
| Download URL | tempo_api_python_client-0.12.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
989569a02bed93b0820f00722c3c8ab3846a1b6a568d24c14b61477320f115cc
|
|
BLAKE2b-256 checksum How to use checksums |
bbf07c585a68faafbf0fa5bf12809e2f71a001ea4cf0bc1f19af268e12efb9d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for tempo-api-python-client 0.12.0
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.