Documentation: https://pyomie.readthedocs.io
Source Code: https://github.com/luuuis/pyomie
A command-line interface and asynchronous client library for OMIE - Spain and Portugal electricity market data.
Install this via pip (or your favourite package manager):
pip install pyomie
The pyomie CLI allows querying day-ahead market data for a given date.
% pyomie --help
Usage: pyomie [OPTIONS] [DATE]
Fetch the OMIE spot price data.
╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ date [DATE] Date to fetch in YYYY-MM-DD format [default: today's date] │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --csv Print the CSV as returned by OMIE, without parsing. │
│ --verbose Verbose mode. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯By default, the output is a JSON payload that may be used by other tooling.
% pyomie 2025-10-02 | jq -c '{date: .market_date, average_pt:(.pt_spot_price|add/length)}'
{"date":"2025-10-02","average_pt":86.3228125}You can also pipx run pyomie to run the CLI from a temporary virtual environment.
Thanks to these contributors (emoji key):
Luis Miranda 💻 🤔 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
This package was created with Copier and the browniebroke/pypackage-template project template.