api_external module¶
The api_external module is part of the nmeta suite, but is run separately
This module runs a class and methods for an API that exposes an interface into nmeta MongoDB collections.
It leverages the Eve Python REST API Framework
-
class
api_external.ExternalAPI(config)¶ Bases:
baseclass.BaseClassThis class provides methods for the External API
-
ingest_dictionary(filename)¶ Read text file that is in dictionary format into a Python dictionary object. Uses ast module.
-
m_pi_rate_response(items)¶ Update the response with the packet_in rate. Hooked from on_fetched_resource_<name>
-
on_inserted_callback(resource_name, items)¶ Runs on Decision API database inserts, after database insertion completed. It places a message onto the multi-process queue that contains link to resource in database
-
post_get_callback(resource, request, payload)¶ TBD
-
pre_get_callback(resource, request, lookup)¶ Runs on GET request pre database lookup
-
run()¶ Run the External API instance
-