Skip to main content

diariopy hex logo

diariopy

CI PyPI Python Docs

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.

📦 Using R? See the sibling package diario (CRAN · docs).

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_URL environment variable (useful for staging or testing).
  • Logging — the package logs through the diariopy logger 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

Citation

If you use diariopy in your work, please cite it. Citation metadata lives in CITATION.cff; GitHub renders a ready-to-use citation from it via the "Cite this repository" button.

License

MIT — see LICENSE.

Metadata

Release files for diariopy 0.1.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 diariopy 0.1.1
File Size Uploaded
diariopy-0.1.1.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for diariopy 0.1.1
File Interpreter ABI Platform
diariopy-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / diariopy-0.1.1.tar.gz

Download URL diariopy-0.1.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1ccad3a2c3d0427fad690097357314ba8c06994f2cd72f9ef16dcdc3130b9459
BLAKE2b-256 checksum
How to use checksums
07662038d2b0b1f91a801ae9bd40cea8f788c71563c08dd6a926feb4d715e416
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / diariopy-0.1.1-py3-none-any.whl

Download URL diariopy-0.1.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63352e3264c2f40e9d38bb7cf74431a7ef61676b59a677437ddf53a8abe82dd0
BLAKE2b-256 checksum
How to use checksums
f6868795c73b7f977e0f736c826202b3b140bf97ebdc6878ecef95b2bddc79f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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