Skip to content
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

Added support to pvpc and spot price #24

Open
wants to merge 3 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
43 changes: 40 additions & 3 deletions esios/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ class ProfilePVPC(Indicator):
pass


class PricePVPC(Indicator):
pass


class PriceSPOT(Indicator):
pass


class ProfilePVPC20A(ProfilePVPC):
path = 'indicators/526'

Expand Down Expand Up @@ -89,9 +97,6 @@ class ProfilePVPC20TD(ProfilePVPC):
path = 'indicators/1006'


class PricePVPC(Indicator):
pass


class PricePVPC20A(ProfilePVPC):
path = 'indicators/1013'
Expand Down Expand Up @@ -229,6 +234,38 @@ class mhpEnergyBalanceFree(Indicator):
path = 'indicators/1366'


class PriceSPOTDaily(PriceSPOT):
path = 'indicators/600'


class PriceSPOTIntraday1(PriceSPOT):
path = 'indicators/612'


class PriceSPOTIntraday2(PriceSPOT):
path = 'indicators/613'


class PriceSPOTIntraday3(PriceSPOT):
path = 'indicators/614'


class PriceSPOTIntraday4(PriceSPOT):
path = 'indicators/615'


class PriceSPOTIntraday5(PriceSPOT):
path = 'indicators/616'


class PriceSPOTIntraday6(PriceSPOT):
path = 'indicators/617'


class PriceSPOTIntraday7(PriceSPOT):
path = 'indicators/618'


class mhpEnergyBalanceInc(Indicator):
path = 'indicators/1368'

Expand Down
68 changes: 67 additions & 1 deletion esios/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,74 @@ def C2_liquicomun(self):
"""
return archives.C2_liquicomun(self)

@base.resource(indicators.PricePVPC20A)
def price_pvpc_20A(self):
"""Get PVPC price for 2.0A
"""
return indicators.PricePVPC20A(self)

@base.resource(indicators.PricePVPC20DHA)
def price_pvpc_20DHA(self):
"""Get PVPC price for 2.0DHA
"""
return indicators.PricePVPC20DHA(self)

@base.resource(indicators.PricePVPC20DHS)
def price_pvpc_20DHS(self):
"""Get PVPC price for 2.0DHS
"""
return indicators.PricePVPC20DHS(self)

@base.resource(indicators.PriceSPOTDaily)
def price_spot_daily(self):
"""Get price for daily SPOT market
"""
return indicators.PriceSPOTDaily(self)

@base.resource(indicators.PriceSPOTIntraday1)
def price_spot_intraday1(self):
"""Get price for intraday SPOT market, session 1
"""
return indicators.PriceSPOTIntraday1(self)

@base.resource(indicators.PriceSPOTIntraday2)
def price_spot_intraday2(self):
"""Get price for intraday SPOT market, session 2
"""
return indicators.PriceSPOTIntraday2(self)

@base.resource(indicators.PriceSPOTIntraday3)
def price_spot_intraday3(self):
"""Get price for intraday SPOT market, session 3
"""
return indicators.PriceSPOTIntraday3(self)

@base.resource(indicators.PriceSPOTIntraday4)
def price_spot_intraday4(self):
"""Get price for intraday SPOT market, session 4
"""
return indicators.PriceSPOTIntraday4(self)

@base.resource(indicators.PriceSPOTIntraday5)
def price_spot_intraday5(self):
"""Get price for intraday SPOT market, session 5
"""
return indicators.PriceSPOTIntraday5(self)

@base.resource(indicators.PriceSPOTIntraday6)
def price_spot_intraday6(self):
"""Get price for intraday SPOT market, session 6
"""
return indicators.PriceSPOTIntraday6(self)

@base.resource(indicators.PriceSPOTIntraday7)
def price_spot_intraday7(self):
"""Get price for intraday SPOT market, session 7
"""
return indicators.PriceSPOTIntraday7(self)

@base.resource(archives.P48Cierre)
def p48cierre(self):
"""Get the p48cierre zip file
"""
return archives.P48Cierre(self)
return archives.P48Cierre(self)