Skip to main content

Async python client for the Italian energy markets API.

Project description

mercati-energetici

Async python library for Italian energy markets

Unofficial wrapper of the GME (Gestore dei Mercati Energetici S.p.A.) APP API. It allows to retrieve prices and volumes traded on the Italian energy markets (electricity, gas and environmental) in a simple and asynchronous way.

Disclaimer

This library is not affiliated with GME (Gestore dei Mercati Energetici S.p.A.) in any way. It is provided as is, without any warranty. By using this library, you agree to the terms of use of GME API, which can be obtained with get_general_conditions() or can be found here. Please, be aware that all the data belongs to GME and can't be used for profit. Also, be aware of the disclaimer from GME retrivable with get_disclaimer().

Example

"""How to get the average price of electricity in Italy (PUN) for a specific date."""
import asyncio
from mercati_energetici import MGP
from datetime import date


async def main():
    async with MGP() as mgp:

        # By using this library, you agree to the terms of use of GME API
        # which can be obtained with:
        print(mgp.get_general_conditions())

        # Also, be aware of the following disclaimer from GME
        print(mgp.get_disclaimer())

        # Get PUN price
        print("PUN avg: ", await mgp.daily_pun(date(2023, 3, 28)))


if __name__ == "__main__":
    asyncio.run(main())

Documentation

The library exposes three low level classes to access the GME API: MercatiElettrici, MercatiGas and MercatiAmbientali. A further class, MGP, offers a higher level interface over the day-ahead electricity market.

Installation

pip install mercati-energetici

Usage

See the documentation for more details.

Project details


Download files

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

Source Distribution

mercati_energetici-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

mercati_energetici-0.1.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file mercati_energetici-0.1.0.tar.gz.

File metadata

  • Download URL: mercati_energetici-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.19.0-35-generic

File hashes

Hashes for mercati_energetici-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb03ff14e4deb517d91fac91c1c2ff8742563570036c0d0da8f4f9751df8f3de
MD5 6c4ed85266736af3f83b3f2f4be7a7fd
BLAKE2b-256 a824e8b4d64ef4333b507cab0b35fd2f997d5e2ac377ea72d3206479965be1de

See more details on using hashes here.

File details

Details for the file mercati_energetici-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mercati_energetici-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.19.0-35-generic

File hashes

Hashes for mercati_energetici-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d1c3793f540ea4b8fe4275ab2d9490187d051940e5eef240a12d0e416441ff5
MD5 e1a2e7eccd36ddfb9229eb5ad885a732
BLAKE2b-256 ad8e212f8069ab9f16046c5c7062bbae62f9a027fc952b15ce6a30e4425b32be

See more details on using hashes here.

Supported by

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