Skip to main content

Python client for Fingrid API

Project description

fingrid-py

PyPI CI Repo Size License Ruff Pyright Deptry Pytest

Python package to provide access to Fingrid (Finnish TSO) datasets through open REST API interface.

How to Get Started

  1. Make sure you have an active email address.
  2. Do register and approve the license and terms of use.
  3. You will receive a personal API-key right away. If you don't receive the email, please check your Junk/Spam folder.
  4. Registered users may opt-in to receive email maintenance breaks or other important changes about API.
  5. If you want, you can also delete your account and the related API-key.

Installation

pip install fingrid-py

Usage

Fetch data using utility functions

api_key = "<your own API key>"

from fingrid import get_data, get_series_metadata

# Get datasets' metadata:
metadata_dict = get_series_metadata(api_key)                    # as json dict
metadata_df = get_series_metadata(api_key, to_dataframe=True)   # as Pandas.DataFrame

# Get datasets' timeseries data:
data_df = get_data(
  api_key,
  [277, 317, 347],
  "2025-09-01 01:00",
  "2025-09-10 01:00",
)

Call directly API endpoints

There are 9 different endpoints provided by API. All endpoints work in the same way with the same methods.
You can easily import and instantiate the endpoint's class and call the get() method to get the raw data in json format.

# Example

from fingrid import GetHealthStatus

health = GetHealthStatus(api_key).get()

Check out the parameters of each endpoint here.
Alternatively, you can call the get() method and the system will complain if any required parameter is missing.

Information for Developers

Technical API documentation for developers is available here.

  • You can access data in JSON and DataFrame formats.
  • Each dataset has a unique datasetId number that you need to use in API requests. Find about available datasets here.
  • You can make 10,000 requests in 24h period and 10 requests per 1 minute with one API-key. Please contact the admin if you need more.
  • Timestamps are by default presented in UTC time zone.
  • If you request frequently updated data from an extended date range, you may receive an error message that results from exceeding the maximum allowed API payload.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

fingrid_py-0.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file fingrid_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fingrid_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fingrid_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0b1c784a0133ed8a5a0e09171e900b9a356bf306ddbeb44fe93b424caf382da
MD5 ce82eeb7a31f482c6b8873deaea3d22c
BLAKE2b-256 b1ef0df0853ecfd4a276eeabb764ef221c357c5504cbe449dd069ab6a7f77027

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