Skip to content

Fixing installation issue #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Code source for downloading rte data using rte digital on-line services : https:

pip install git+https://github.com/ReinboldV/api_rte.git

1) Create a profile at https://data.rte-france.com/.
2) Create a profile at https://data.rte-france.com/.

2) Create an application for web server and start associating API to this application. Note that you won't have access to API if note associated with you application.
3) Create an application for web server and start associating API to this application. Note that you won't have access to API if note associated with you application.

In the application tab, one will find the `client id` and the related `client secret` code needed for requesting data. Add those to the configuration file `api_config.py`.
In the application tab, one will find the `client id` and the related `client secret` code needed for requesting data. Add those to the configuration file `api_rte\config.py`.

CLIENT_ID = '7699170f-9898-40d0-b78a-XXXXXXXXXXXX'
CLIENT_SECRET = '969de489-1dca-4158-8ad4-XXXXXXXXXXXX'

3) Testing the configuration and the api :
4) Testing the configuration and the api :

python tests/test_conf.py
python tests/test_api.py
Expand All @@ -32,7 +32,7 @@ Code source for downloading rte data using rte digital on-line services : https:

Here is a minimal example for tempo tarifs :

from api_rte import *
from api_rte.api import *
import datetime

start_date = datetime.datetime.today() - datetime.timedelta(days=2) # before yesterday
Expand All @@ -42,7 +42,7 @@ Code source for downloading rte data using rte digital on-line services : https:

Here is a minimal example for one day ahead wind production forecasts :

from api_rte import *
from api_rte.api import *
import datetime

start_date = datetime.datetime.today() - datetime.timedelta(days=2) # before yesterday
Expand Down
1 change: 1 addition & 0 deletions api_rte/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '1.1.0'
2 changes: 1 addition & 1 deletion api_rte.py → api_rte/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import requests
import pandas as pd

from api_config import *
from api_rte.config import *


def get_token(oauth_url=OAUTH_URL,
Expand Down
2 changes: 1 addition & 1 deletion api_config.py → api_rte/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
'D-2', # 2 days ahead
'D-1', # 1 days ahead
'CURRENT', # current
'ID'] # intra-day
'ID'] # intra-day
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from setuptools import setup

import api_rte
setup(
name='api_rte',
version=1.1,
version=api_rte.__version__,
description='Library RTE API',
author='Vincent Reinbold',
author_email='vincent.reinbold@geeps.centralesupelec.fr',
license='GNU GENERAL PUBLIC LICENSE v3',
packages=[],
classifiers=["Programming Language :: Python :: 3.7"], install_requires=['requests', 'urllib3', 'pandas']
packages=['api_rte'],
classifiers=["Programming Language :: Python :: 3.7"],
install_requires=['requests', 'urllib3', 'pandas'],
test_suite='tests',
)
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from unittest import TestCase
4 changes: 2 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from api_config import *
from api_rte import *
from api_rte.config import *
from api_rte.api import *
import datetime


Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from api_config import *
from api_rte.config import *


class TestConfig(unittest.TestCase):
Expand Down