Python interface to the Diário de Obras (diariodeobras.net) API
Project description
diariopy
diariopy is a Python interface to the diariodeobras.net
("Diário de Obras") platform — the Python counterpart of the R package
diario. It securely stores an API
token and wraps authenticated requests to retrieve projects, tasks, reports, and more.
Disclaimer. This package is a wrapper for the API provided by the Diário de Obras platform, which owns the data. Function and argument names are in English, but because the source API is in Portuguese, response keys and some data values are returned in Portuguese. Access requires a valid authentication token issued by the platform.
Installation
pip install diariopy
Getting started
import diariopy
# 1. Store your API token securely (uses the system keyring)
diariopy.store_token("YOUR_API_TOKEN_HERE")
# 2. Confirm it was stored
diariopy.retrieve_token()
# 3. Make authenticated requests
company = diariopy.get_company()
projects = diariopy.get_projects()
Usage
project_id = "6717f864d163f517ae06e242"
diariopy.get_entities() # registered entities (cadastros)
diariopy.get_project_details(project_id) # one project
diariopy.get_task_list(project_id) # schedule items (cronograma)
diariopy.get_task_details(project_id, task_id)
diariopy.get_reports(project_id, limit=10, order="asc")
diariopy.get_report_details(project_id, report_id)
All getters return parsed JSON (Python dict/list). Request failures raise
diariopy.DiarioError; invalid arguments raise ValueError.
Configuration
- Base URL — override with the
DIARIO_BASE_URLenvironment variable (useful for staging or testing). - Logging — the package logs through the
diariopylogger and does not print.
Development
uv sync --extra test # or: pip install -e ".[test]"
uv run pytest # tests mock the network; no token required
uv build # build sdist + wheel
License
MIT — see LICENSE.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diariopy-0.1.0.tar.gz.
File metadata
- Download URL: diariopy-0.1.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2397c3209a38da1d119c46c32d0a7ab72b3d2ca0de361a7a2a87aef610d66e39
|
|
| MD5 |
f69ebdac746e3b1111acdbf43950934d
|
|
| BLAKE2b-256 |
6169047d47a36c6995e85cf312bb0c8d219c95fa5db9bb3a70020288f240be0c
|
Provenance
The following attestation bundles were made for diariopy-0.1.0.tar.gz:
Publisher:
publish.yml on StrategicProjects/diariopy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diariopy-0.1.0.tar.gz -
Subject digest:
2397c3209a38da1d119c46c32d0a7ab72b3d2ca0de361a7a2a87aef610d66e39 - Sigstore transparency entry: 1968435425
- Sigstore integration time:
-
Permalink:
StrategicProjects/diariopy@f5976ef9cddd5b24fbb1de7c36f3ef7d34aaf957 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f5976ef9cddd5b24fbb1de7c36f3ef7d34aaf957 -
Trigger Event:
release
-
Statement type:
File details
Details for the file diariopy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: diariopy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb7a8d182607ec331c91b87d8369e7c47555ee5fbcc4a151e0e668e426cbccdb
|
|
| MD5 |
945cd52ec5e046b1c7bd7cf8ec0013e7
|
|
| BLAKE2b-256 |
b0a3dd8c49ff9db314de7b2718c3394562e997afc7d10699e89f03269d6f32d0
|
Provenance
The following attestation bundles were made for diariopy-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on StrategicProjects/diariopy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diariopy-0.1.0-py3-none-any.whl -
Subject digest:
fb7a8d182607ec331c91b87d8369e7c47555ee5fbcc4a151e0e668e426cbccdb - Sigstore transparency entry: 1968435520
- Sigstore integration time:
-
Permalink:
StrategicProjects/diariopy@f5976ef9cddd5b24fbb1de7c36f3ef7d34aaf957 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f5976ef9cddd5b24fbb1de7c36f3ef7d34aaf957 -
Trigger Event:
release
-
Statement type: