Skip to content

Commit

Permalink
examples
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Aug 5, 2024
1 parent 9620c75 commit ff7a90a
Show file tree
Hide file tree
Showing 3 changed files with 450 additions and 1 deletion.
88 changes: 88 additions & 0 deletions Example_api_key[parameter].ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "9a77611e-3737-43b9-acb1-c8ad8aac3a3b",
"metadata": {},
"outputs": [],
"source": [
"# Example .env file content [it may require restart the Kernel after saving the file ]\n",
"``` bash \n",
" EVDS_API_KEY=AxByCzDsFoGmHeIgJaKrLbMaNgOe\n",
" \n",
" # while working behind proxy \n",
" \n",
" http_proxy=http://proxy.example.com:80\n",
" https_proxy=http://proxy.example.com:80\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "d91d712b-4a4c-486c-8c07-2e5aa7cccc92",
"metadata": {},
"source": [
"## api key parameter alternative\n",
"Instead of saving .env file to work environment you may also use api_key parameter to give your api key to the function\n",
"directly\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "51718dd1-6aa8-4e2a-a794-0572d0910315",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<CacheFound>\n",
" TP_DK_USD_A TP_DK_EUR_A TP_DK_CHF_A TP_DK_GBP_A TP_DK_JPY_A Tarih\n",
"0 NaN NaN NaN NaN NaN 01-01-2017\n",
"1 3.5192 3.7099 3.4454 4.3189 3.0025 02-01-2017\n",
"2 3.5338 3.7086 3.4522 4.3488 3.0065 03-01-2017\n",
"3 3.5737 3.7278 3.4744 4.3840 3.0220 04-01-2017\n",
"4 3.5764 3.7291 3.4751 4.3794 3.0292 05-01-2017\n"
]
}
],
"source": [
"from evdspy import get_series , get_series_exp \n",
"index = \"\"\"\n",
"TP.DK.USD.A\n",
"TP.DK.EUR.A\n",
"TP.DK.CHF.A\n",
"TP.DK.GBP.A\n",
"TP.DK.JPY.A\n",
"\n",
"\n",
"\"\"\"\n",
"df = get_series(index, api_key = 'ABCDEFGH' , start_date=\"01-01-2017\", end_date=\"31-12-2017\" )\n",
"print(df.head())"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit ff7a90a

Please sign in to comment.