Python ERSE
A Python package for Portuguese energy tariffs and ERSE information. Requires Python 3.11 or newer.
This follows ERSE information such as https://www.erse.pt/atividade/regulacao/tarifas-e-precos-eletricidade/#periodos-horarios
Installation
python -m pip install pyerse
Development
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
ruff check .
ruff format --check .
python -m pytest
python -m build
python -m twine check --strict dist/*
Use ruff format . to format code. CI checks Python 3.11–3.14 and builds both
a source distribution and a wheel, then tests the installed wheel outside the
source tree. Package metadata and tool configuration live in pyproject.toml;
VERSION remains the single source of the package version.
Releases to PyPI
One-time setup:
- Create a GitHub environment named
pypiindgomes/pyerse. - In the PyPI project's Publishing settings, add a GitHub Trusted Publisher:
owner
dgomes, repositorypyerse, workflowpython-publish.yml, environmentpypi. See the PyPI instructions.
For each release, update VERSION to a new, unused PyPI version and commit it
with the release changes. Tag that commit with the version (for example,
v0.0.5 for VERSION containing 0.0.5) and publish a GitHub release.
Draft releases do not publish. Published prereleases also upload to PyPI;
use a PEP 440 prerelease version such as 0.0.5rc1 for those.
The release workflow checks the tag against VERSION, runs the full CI suite,
and publishes the validated wheel and source distribution through Trusted
Publishing. No PyPI username, password, or API-token secrets are needed.
Any configured GitHub environment approval rules must be satisfied before
publication. PyPI does not allow replacing a previously uploaded version.
Metadata
Release files for pyerse 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyerse-0.0.7.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyerse-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.0 kB
Release files / pyerse-0.0.7.tar.gz
| Download URL | pyerse-0.0.7.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7d6e169dd6fc9f14c1b9f9709f2d608d11b8e12b1a012f1eefac65a0036b66a
|
|
BLAKE2b-256 checksum How to use checksums |
e3eea7a49de9d7c4d5a01b3a29159f35812757f658739e34ef01d08bbeb9e73c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 8, 2026.
Transparency logRelease files / pyerse-0.0.7-py3-none-any.whl
| Download URL | pyerse-0.0.7-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce31b653bccaf9130eca431d3a382c88e37d80b7dae6bd8f6e7e0954c57f9db9
|
|
BLAKE2b-256 checksum How to use checksums |
93957340270b9d0fe58aee1dc5f8c57e2285b8ec6fbdbc0d5face9a8891953ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 8, 2026.
Transparency log