Skip to main content

EPIAS Transparency Platform v2.0 Python client by Robokami Data

Project description

PyPI - Version PyPI - Downloads

🇹🇷 Türkçe açıklama için aşağıya bakınız.

[!IMPORTANT]
eptr2 is still in active development. Breaking changes can be expected. Fill an issue if you encounter any problem.

EPIAS Transparency Platform v2.0 Python client by Robokami Data

eptr2 (EPIAS Transparency 2.0) package is a thin wrapper around EPIAS Transparency Platform v2.0 API brought to you by Robokami. It is an unofficial package with Apache License 2.0 (free and permissable use for commercial applications, see details).

eptr2 currently more than 100 services with convenience methods. You can also use transparency_call function to call any service with any method and body.

Installation

You can simply use PyPI to install eptr2 package or directly through GitHub. See eptr2demo page for available calls and examples.

pip install eptr2

NOTE: Starting from v0.4.0, data frame returns will be optional. If pandas is not installed, data frames will not be returned. You can install "dataframe" version with the following command. (Not implemented yet)

pip install "eptr2[dataframe]"
pip install git+https://github.com/Tideseed/eptr2.git

Usage

You can simply use EPTR2 class to call services with convenience methods. Main object call has some parameters to control the behavior of the package. You can set ssl_verify to False if you have SSL verification problems. You can set postprocess to False if you don't want to get data frames as response. You can set get_raw_response to True if you want to get raw urllib3 response object.

from eptr2 import EPTR2

eptr = EPTR2(
        ssl_verify=True,  ## SSL verification (default: True)
        postprocess=True, ## If you want to get data frames as response (default: True) install pandas
        get_raw_response=False ## If you want to get raw urllib3 response object (default: False)
        )

mcp_call = eptr.call("mcp",start_date="2023-10-10",end_date="2023-10-10")
print(mcp.json())

You can search for available calls with eptr.get_available_calls() function. We plan to include all transparency services in the future.

available_calls = eptr.get_available_calls()
print(available_calls)

You can also directly call the transparency calls but you need to know what you are doing (paths and correct parameters).

from eptr2 import transparency_call

mcp = transparency_call(
    call_path="electricity-service/v1/markets/dam/data/mcp",
    call_method="POST",
    call_body={"startDate":"2023-10-10T00:00:00+03:00","endDate":"2023-10-10T00:00:00+03:00"}
    )

print(mcp.json())

EPİAŞ Şeffaflık Platformu 2.0 Python kütüphanesi (Robokami Data)

eptr2 (EPİAŞ Transparency 2.0) paketi Robokami tarafından EPİAŞ Şeffaflık Platformu 2.0 API'si üzerine geliştirilmiş bir Python paketidir. Apache License 2.0 ile lisanslanmıştır (ücretsiz ve büyük ölçüde serbest kullanım).

Yukarıdaki yükleme ve kullanım talimatları ile hızlıca başlayabilirsiniz.

[!IMPORTANT]
eptr2 hala aktif olarak geliştirilmektedir. Büyük değişiklikler beklenebilir. Herhangi bir sorunda, issue kısmından istek açabilirsiniz.

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

eptr2-0.4.1.tar.gz (34.3 kB view hashes)

Uploaded Source

Built Distribution

eptr2-0.4.1-py3-none-any.whl (36.4 kB view hashes)

Uploaded Python 3

Supported by

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