-
Notifications
You must be signed in to change notification settings - Fork 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
FRED-like API interface #8
Comments
In flask will need some kind of catch-all url for this |
Possibly can formalise above as incoming json: # per-query
format='csv'
# good for several datapoints
domain='cbr_fx'
# let's just accept string date stamp for start
start = '2017'
# one datapoint
varname='USDRUR'
frequency='m' #when omitted go to highest frequency possible, usually day or month
modifier='eop' Here modifier varname='INDPRO'
frequency='m' #when omitted go to highest frequency possible, usually day or month
modifier='rog' Domain definition looks vulnerable, one domain is better for user, may use categories instead. |
Предполагаемая единица хранения: domain = 'ru'
source = 'mini-kep'
varname ='INDPRO'
unit ='rog'
frequency ='m'
date = '2017-03-31'
value = 107.1 |
@relique - does flask have a capability to catch nested URLs like /ru/series/INDPRO/q/rog without specifiing what is after /ru/series/ or how many slashes will there be? |
Hi @epogrebnyak yes, Flask does have this capability. Sample route: |
Reference paths, to be converted to dict/json:
domains are good to get same indicator for different countries
other than that they are to organise the thingking about the sources, and queries about what is availiable:
|
Mandatory:
Optional:
|
From catching the URL following result is needed: domain = 'ru:bank'
varname ='INDPRO'
frequency ='m'
postfix ='rog'
start_year = None
end_year = None
formatter = None |
I think we want an URL catcher like:
|
A reading on API design, to note:
|
|
|
RFC:
Changes:
|
We now have experimental catcher working: |
Also discussed here mini-kep/intro#12 |
with apiary we can do the following tasks: |
{?rate}/{?agg} are mutually exclusive, we can either have {?rate} or {?agg}, so better call them {?suffix}, later in the program:
|
After reading https://research.stlouisfed.org/docs/api/fred/ here are some thoughts on how this app urls may look like and what they'd do.
This is fantasy url system for this app:
The text was updated successfully, but these errors were encountered: