API#
Metacatalog API Overview#
Importing#
The metacatalog.api submoule contains all API functions that are available for Python. The CLI also relies on the API and therefore using the Api is the recommended way to use metacatalog.
It is recommended to import the API like:
from metacatalog import api
If you have other modules present that are called api
, it is recommended
to import the API like:
from metacatalog import api as mc_api
Functions#
There are three functions that are used to connect to the database and create the necessary tables to setup metacatalog These are:
All other API functions follow a similar pattern. Each of them expect a
Session
as the first argument
(See connect_database()
).
The names of all functions in metacatalog.api are prefixed with an action identifier:
find_*
to find entities on exact matches and filtersadd_*
to add new entititesshow_*
to inspect raw table records