GME Web API
Simple Interface to use the GME Web Api programmatically
As the GME does not provide a public API to access data, I've made this library to allow the use of the web facing API used by the site to retrieve the values for various energy prices.
It may be subject to changes and the mechanism used for auth by the site could change anytime.
For now this has the package "requests" as the only dependency, this could be removed by using the built-in urllib3 module, but it's much more cumbersome to use, so that's it, if you don't like it, contributions are welcome!
Usage is pretty basic.
import the package, initialize the api, get prices
everything apart the dates are type checked and enumerated trough classes so just check the source to get the options for the parameters, default to today pun with 15m prices.
it should be a package on pypi but i had no time for that yet, so you'll need to use this as a repo dependency if you want to use it programmatically.
import gmewebapi
#or
#from src import gmewebapi
#if using locally from venv
gme = gmewebapi.GME()
gme.initialize()
gme.getPrice(20260620, 20260621, Granularita, Mercato, Zona, Tipologia)
Metadata
Release files for gmewebapi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gmewebapi-0.1.2.tar.gz | 3.5 kB | Without provenance | Details for gmewebapi-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gmewebapi-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for gmewebapi-0.1.2-py3-none-any.whl |
Total release size: 7.9 kB
Release files / gmewebapi-0.1.2.tar.gz
| Download URL | gmewebapi-0.1.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
751f911b22ec396b4b7207d756763f97373a271a9ad6dd43535bb72d602c3684
|
|
BLAKE2b-256 checksum How to use checksums |
eca7853a3b933731f06c02fa5618f2e4b25d3ca8f63f651e808d71c7149d825f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gmewebapi-0.1.2-py3-none-any.whl
| Download URL | gmewebapi-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5103f1e6861839c15d844ab1672b85eddacf9cb94ca6d6a9efad3cedbeee7325
|
|
BLAKE2b-256 checksum How to use checksums |
ff204b818cae8e2b84728f14fb2e5c5e533dad57d06647f489ac1a3c571d69cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for gmewebapi 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.