usage: openfisca serve [-h] [-c COUNTRY_PACKAGE]
[-e [EXTENSIONS [EXTENSIONS ...]]]
[-r [REFORMS [REFORMS ...]]] [-p PORT]
[--tracker-url TRACKER_URL]
[--tracker-idsite TRACKER_IDSITE]
[--tracker-token TRACKER_TOKEN]
[--welcome-message WELCOME_MESSAGE]
[-f CONFIGURATION_FILE]
-c, –country-package | |
-e, –extensions | |
-r, –reforms | |
-p, –port | |
–tracker-url | |
–tracker-idsite | |
–tracker-token | |
–welcome-message | |
-f, –configuration-file | |
openfisca serve
uses gunicorn
under the hood. In addition to the arguments listed above, you can use any gunicorn
arguments when running openfisca serve
(e.g. --reload
, --workers
, --timeout
, --bind
).
See:
gunicorn --help
openfisca serve --country-package openfisca_france
openfisca serve --country-package openfisca_france --extensions openfisca_paris
openfisca serve --country-package openfisca_france --reforms openfisca_france.reforms.plf2015.plf2015
You can setup openfisca serve
using a configuration file. Be careful as parameters with a ‘-‘ in their name on command line change to an ‘_’ when used from the config file. See this example of configuration:
config.py:
port = 4000
workers = 4
bind = '0.0.0.0:{}'.format(port)
country_package = 'openfisca_france'
extensions = ['openfisca_paris']
Command line:
openfisca serve --configuration-file config.py