Skip to content

Commit

Permalink
v1.1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Apr 14, 2024
1 parent 184de06 commit 02f3c79
Show file tree
Hide file tree
Showing 113 changed files with 9,348 additions and 8,162 deletions.
Binary file added .DS_Store
Binary file not shown.
152 changes: 146 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,155 @@
[![Python package](https://github.com/SermetPekin/evdspy-repo/actions/workflows/python-package.yml/badge.svg)](https://github.com/SermetPekin/evdspy-repo/actions/workflows/python-package.yml) [![PyPI](https://img.shields.io/pypi/v/evdspy)](https://img.shields.io/pypi/v/evdspy) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/evdspy)](https://pypi.org/project/evdspy/) [![Downloads](https://pepy.tech/badge/evdspy/week)](https://pepy.tech/project/evdspy)

## evdspy
### Updated on this version
* get_df_datagroup function was added

![image](https://user-images.githubusercontent.com/96650846/201921534-22ef45f0-85cf-4982-b160-2fe37a21d491.png)
### Updated on 1.1.17

* The API key parameter has been moved to the HTTP header as required by recent updates from EDDS data provider.
This change enhances security by ensuring that sensitive information is not exposed in URLs.
* get_series function was added

```python

from evdspy import get_series , default_start_date_fnc , default_end_date_fnc
balance_of_pay1 = "TP.ODEMGZS.BDTTOPLAM", "TP.ODEMGZS.ABD"
balance_of_pay2 = """
TP.ODEMGZS.BDTTOPLAM #
TP.ODEMGZS.ABD #
"""
cache = True

df = get_series(balance_of_pay2,
frequency="weekly",
start_date=default_start_date_fnc(),
end_date=default_end_date_fnc(),
aggregation=("avg",),
# proxy="http://127.0.0.1:8000",
# proxies={"http": "http://127.0.0.1:8000"},
cache=cache,
debug=False)
print(df)



```

### Updated on 1.1.6
## example usages

* Fixed type error on json result.
* Some more type hints and refactoring.
```python

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", formulas="avg")
df4 = get_series(template, start_date="01-01-2000", frequency="monthly", formulas=("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 params

```python
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:
...


""" Formulas
percentage_change = 1
difference = 2
year_to_year_percent_change = 3
year_to_year_differences = 4
percentage_change_compared = 5
difference_compared = 6
moving_average = 7
moving_sum = 8
"""
"""Frequency
daily = 1
business = 2
weekly = 3 # Friday
semimonthly = 4
monthly = 5
quarterly = 6
semiannually = 7
annual = 8
annually = 8
"""

""" Aggregation
avg : "avg"
min : "min"
max : "max"
first : "first"
last : "last"
sum : "sum"
"""
"""proxy
proxy = "http://proxy.example.com:80"
"""

"""proxies
proxies = {
'http': "http://proxy.example.com:80",
'https': "http://proxy.example.com:80",
}
"""

```

### Updated on 1.1.16
* get_df_datagroup function was added

```python
from evdspy.main import *

df = get_df_datagroup(
datagroup="bie_gsyhgycf",
start_date="01-01-1998",
end_date="01-01-2030",

)

print(df)
```

### Updated on 1.1.1

Expand Down
215 changes: 215 additions & 0 deletions evdspy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
--APIKEY_FOLDER/
APIKEY_FOLDER/
APIKEY*/
API*/
API*.*
arch.txt
*h.txt

SeriesData/
logs/
pickles/
tests/
test.py
unit_tests/
other_tests/
OTHER_TESTS/

dev/
---/
--*.*
--*/
*ignore*/
*ignore*.*
ignore_*.*
ignore_*/
ignore/
ignore*
*IO/
setup_config.py

p/
tox.ini
api_key.txt
apikey.txt
*.pickle
*proxy*/

.idea
*series.cfg
options.cfg
# C extensions
*.so

.vscode/
*.*DS_Store

.DS_Store

# Distribution / packaging
.Python
*APIKEY_FOLDER/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST


*.xls
*.xlsx
*.csv
*.txt
*.cmd
*.cfg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
/_version.py
/EVDSlocal/APIKEY_FOLDER/
2 changes: 1 addition & 1 deletion evdspy/EVDSlocal/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import evdspy
import evdspy
1 change: 1 addition & 0 deletions evdspy/EVDSlocal/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#1.1.17
Loading

0 comments on commit 02f3c79

Please sign in to comment.