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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diariopy-0.1.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diariopy-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file diariopy-0.1.1.tar.gz.

File metadata

  • Download URL: diariopy-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for diariopy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1ccad3a2c3d0427fad690097357314ba8c06994f2cd72f9ef16dcdc3130b9459
MD5 5f93473fd90817205db1c645f609c93c
BLAKE2b-256 07662038d2b0b1f91a801ae9bd40cea8f788c71563c08dd6a926feb4d715e416

See more details on using hashes here.

Provenance

The following attestation bundles were made for diariopy-0.1.1.tar.gz:

Publisher: publish.yml on StrategicProjects/diariopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file diariopy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: diariopy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for diariopy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63352e3264c2f40e9d38bb7cf74431a7ef61676b59a677437ddf53a8abe82dd0
MD5 6b6784a3a5a4f6bacea81a8dae6d435d
BLAKE2b-256 f6868795c73b7f977e0f736c826202b3b140bf97ebdc6878ecef95b2bddc79f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for diariopy-0.1.1-py3-none-any.whl:

Publisher: publish.yml on StrategicProjects/diariopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page