Skip to main content

Python package PyPI Supported Python Versions Downloads Downloads Downloads

Pypi Windows Server Pypi Ubuntu Server

Documentation

Documentation

evdspy

installation

pip install evdspy -U

Updated on this version

  • get_series_exp function was added

    see Documentation for its usage and result data types

other alternative libraries

evdschat

evdschat

package for extended usage of evdspy package. – An open-source RAG application for data aggregation with PyPI.

evdscpp

evdscpp C++ library to retrieve data from CBRT API. package for extended usage of C++ header only package.

api_key usage with evdspy python package

api key will be read from .env file on load if available.

.env file [Alternative 1]

You may create a .env file in your work environment and write your api key as follows. Script will load your api key from this file on load if available.

    # filename : `.env`  
    EVDS_API_KEY=AxByCzDsFoGmHeIgJaKrLbMaNgOe

Proxy from .env file

You may also define your proxies as below in your .env file. Script will load your proxies from this file if they exist.

# example `.env`  file content 

EVDS_API_KEY=AxByCzDsFoGmHeIgJaKrLbMaNgOe
http_proxy=http://proxy.example.com:80
https_proxy=http://proxy.example.com:80

api_key inside get_series function [Alternative 2]

if .env file exists in the current working directory, function does not need api_key parameter.

from evdspy import get_series, default_start_date_fnc, default_end_date_fnc
df1 = get_series("bie_gsyhgycf", cache=False, api_key="YOUR_API_KEY_HERE")
template = """TP_GSYIH01_GY_CF
        TP_GSYIH02_GY_CF
        TP_GSYIH03_GY_CF
        TP_GSYIH04_GY_CF
        TP_GSYIH05_GY_CF
        TP_GSYIH06_GY_CF
        TP_GSYIH07_GY_CF
        TP_GSYIH08_GY_CF
        TP_GSYIH09_GY_CF
        TP_GSYIH10_GY_CF
        TP_GSYIH11_GY_CF
        TP_GSYIH14_GY_CF
        TP_GSYIH15_GY_CF
        TP_GSYIH16_GY_CF
"""
df2 = get_series(template, debug=False, cache=False)
from evdspy import get_series , get_series_exp 
CPI = """
TP.FG.J0  # Consumer Price Index 
"""

inf_exp_market_part = """

TP.ENFBEK.PKA12ENF # Annual inflation expectations of market participants (12-month ahead, %) 

"""
inf_exp_real_sector = """

TP.ENFBEK.IYA12ENF # Annual inflation expectations of real sector (12-month ahead, %) 

"""


for index  in [CPI, inf_exp_market_part, inf_exp_real_sector]:
    res = get_series_exp(index , cache = True  , start_date = "01-01-2010" )
    print(res.data)
    print(res.metadata)

datagroup names can be used to retrieve multiple series

from evdspy import get_series_exp 
cpi_table = """
bie_tukfiy4  # CPI 
"""
inf_exp_table = """
bie_enfbek   # inflation expectations 

"""
reserves_table = """
bie_abres2   # reserves 

"""

def clean_name(name : str ) : 
    return name.replace("\n" , "" ).replace(" " , "") 


for index in [cpi_table, inf_exp_table, reserves_table]:
    res = get_series_exp(index, cache=True, start_date="01-01-2010")
    print(res.data)
    print(res.metadata)
    res.to_excel(clean_name(index) + ".xlsx")

Some more examples

from evdspy import get_series
template = '''
    TP.ODEMGZS.BDTTOPLAM
    TP.ODEMGZS.ABD
    TP.ODEMGZS.ARJANTIN
    '''
df = get_series(index=template)
df1 = get_series(index=template, start_date="01-01-2000", frequency="monthly")
df2a = get_series(index='TP.ODEMGZS.BDTTOPLAM', start_date="01-01-2000", frequency="monthly", cache=True)
df2b = get_series(index=('TP.ODEMGZS.BDTTOPLAM', 'TP.ODEMGZS.ARJANTIN',),
                  start_date="01-01-2000",
                  frequency="monthly",
                  cache=True)
df3 = get_series(template, start_date="01-01-2000", frequency="monthly", aggregation="avg")
df4 = get_series(template, start_date="01-01-2000", frequency="monthly", aggregation=("avg", "min", "avg"))
df5 = get_series(template, proxy="http://proxy.example.com:80")
df6 = get_series(template, proxies={
    'http': "http://proxy.example.com:80",
    'https': "http://proxy.example.com:80",
})

get_series

all parameters of get_series function

from typing import Union
import pandas as pd
def get_series(
        index: Union[str, tuple[str]],
        start_date: str = '01-01-2000',
        end_date: str = '01-01-2100',
        frequency: str = None,  # | monthly | weekly | annually | semimonthly | semiannually | business
        formulas: str = None,  # | level | percentage_change | difference |
        #   | year_to_year_percent_change | year_to_year_differences |
        aggregation: str = None,  # | avg      |min    | max    | first    | last    |    sum
        cache: bool = False,
        proxy: str = None,
        proxies: dict = None,
        debug: bool = False
) -> pd.DataFrame:
    ...
"""proxy
proxy = "http://proxy.example.com:80"
"""
"""proxies
proxies = {
            'http':  "http://proxy.example.com:80",
            'https':  "http://proxy.example.com:80",
        }
"""

Documentation

Here is the documentation for other functions and details.

Documentation

About

evdspy is an open source python interface which helps you make efficient requests by caching results (storing a dict using hashable parameters in order to avoid redundant requests), it provides a user friendly menu to ask data from the institution's API service. It is a Python interface to make requests from (CBRT) EVDS API Server. Fast, efficient and user friendly solution. Caches results to avoid redundant requests. Creates excel files reading configuration text file that can be easily created from the menu or console. Provides visual menu to the user. It is extendable and importable for user's own python projects.

installation

pip install evdspy -U

Documentation

Here is the documentation for other functions and details. Documentation

How to get an API key?

Get a CBRT EVDS API key https://evds3.tcmb.gov.tr/login

Main page of CBRT EVDS API

https://evds3.tcmb.gov.tr

CBRT EVDS API Docs

https://evds3.tcmb.gov.tr/dokumanlar

About

evdspy is an open source python interface which helps you make efficient requests by caching results (storing a dict using hashable parameters in order to avoid redundant requests), it provides a user friendly menu to ask data from the institution's API service.

Disclaimer

We would like inform you that evdspy is not an official package affiliated or endorsed by the CBRT institution.
It is an open source project with MIT LICENSE therefore following the rules of its
general MIT LICENSE you may use this interface without creator's permission, extend it or write your own modules
by importing evdspy's modules, classes or functions to request data from the mentioned API Service following the
institution's rules and parameters.

Metadata

Release files for evdspy 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evdspy 2.1.0
File Size Uploaded
evdspy-2.1.0.tar.gz 91.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evdspy 2.1.0
File Interpreter ABI Platform
evdspy-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 227.9 kB

Release files / evdspy-2.1.0.tar.gz

Download URL evdspy-2.1.0.tar.gz
Size 91.2 kB
Tags Source
SHA-256 checksum
How to use checksums
01797e8443cdb2e1a09f5342b735e0464beb2091002d29f8f834adf3054fbc6a
BLAKE2b-256 checksum
How to use checksums
0ed94ed6310d88985ce9e089cbbba1c596588c08cc864d3946f194d5f679d3d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / evdspy-2.1.0-py3-none-any.whl

Download URL evdspy-2.1.0-py3-none-any.whl
Size 136.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d03f06b2df63d37ca989435b293e114f61d6be705388ea500de3fa6fae6abfe
BLAKE2b-256 checksum
How to use checksums
8bbfce287f83035abaed4b8ac5dea12ad5b11a5f87fa359a08f323101ffefab5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release history Release notifications | RSS feed

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

This release

2.1.0 This release

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.42

2 release files

1.1.41

2 release files

1.1.36

2 release files

1.1.35

2 release files

1.1.34

2 release files

1.1.33

2 release files

1.1.32

2 release files

1.1.31

2 release files

1.1.30

2 release files

1.1.29

2 release files

1.1.28

2 release files

1.1.27

2 release files

1.1.26

2 release files

1.1.24

2 release files

1.1.23

2 release files

1.1.22

2 release files

1.1.21

2 release files

1.1.20

2 release files

1.1.19

2 release files

1.1.18

2 release files

1.1.17

2 release files

1.1.16

1 release file

1.1.15

1 release file

1.1.14

1 release file

1.1.13

1 release file

1.1.12

1 release file

1.1.11

1 release file

1.1.10

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.32

1 release file

1.0.31

1 release file

1.0.30

1 release file

1.0.29

1 release file

1.0.28

1 release file

1.0.27

1 release file

1.0.26

1 release file

1.0.25

1 release file

1.0.24

1 release file

1.0.23

1 release file

1.0.22

1 release file

1.0.21

1 release file

1.0.20

1 release file

1.0.19

1 release file

1.0.18

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page