api package¶
api.api_server module¶
-
api.api_server.run_api_server(host='localhost', port='5000', database_url='mongodb://localhost:27017')¶ Initializes a REST API endpoint that connects to the given database and serves data from it
- Parameters
host – The host on which the API runs
port – The port on which the API runs
database_url – The url (with scheme) of the database from which the API serves data
Module contents¶
cortex.api is a submodule that is responsible for serving a REST API, which is consumed by cortex.cli and cortex.gui By default, it connects to a running MongoDB server, but can be easily extended to different databases