Skip to content

luuuis/pyomie

Repository files navigation

pyomie

CI Status Poetry black pre-commit

PyPI Version pypy downloads Supported Python versions License


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.

Installation

Install this via pip (or your favourite package manager):

pip install pyomie

Usage

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.

Contributors ✨

Thanks to these contributors (emoji key):

Luis Miranda
Luis Miranda

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Copier and the browniebroke/pypackage-template project template.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •