congress.datasources.json_ingester.json_ingester module¶
-
class
congress.datasources.json_ingester.json_ingester.
JsonIngester
(name, config, exec_manager)¶ Bases:
congress.datasources.datasource_driver.PollingDataSourceDriver
-
add_update_method
(method, table_name)¶
-
get_row_data
(table_id, *args, **kwargs)¶ Gets row data for a give table.
-
get_snapshot
(table_name)¶ Return a snapshot of table.
-
get_translator
(translator_name)¶ Get a translator.
Returns a translator specified by translator_name.
-
get_translators
()¶ Get a list of translators.
Returns a list of translators that describes how to translate from the datasource’s data structures to the Congress tables.
-
initialize_translators
()¶ override non-applicable parent method as no-op
-
json_ingester_webhook_handler
(table_name, body)¶
-
poll
()¶ Periodically called to update new info.
Function called periodically to grab new information, compute deltas, and publish those deltas.
-
publish
(table, data, use_snapshot=False)¶
-
register_translator
(translator)¶ Registers translator with congress and validates its schema.
-
update_from_datasource
()¶
-
validate_lazy_tables
()¶ override non-applicable parent method as no-op
-
-
class
congress.datasources.json_ingester.json_ingester.
JsonIngesterEndpoints
(service)¶ Bases:
congress.dse2.data_service.DataServiceEndPoints
-
json_ingester_webhook_handler
(context, table_name, body)¶
-
-
class
congress.datasources.json_ingester.json_ingester.
KeyMap
¶ Bases:
object
Map associating a unique integer key with each hashable object
-
add_and_get_key
(datum)¶ Add a datum and return associated key
-
clear
()¶ Remove all data and keys
-
remove_and_get_key
(datum)¶ Remove a datum and return associated key
-