API Reference
bin
app
A CLI tool for exporting data.
cli()
CLI group.
Source code in datainventory/bin/app.py
9 10 11 12 |
|
destroy(device_id, inventory_path)
Destroy the inventory data.
Source code in datainventory/bin/app.py
39 40 41 42 43 44 45 46 47 |
|
inventory_export(device_id, inventory_path, export_path)
Export the entire inventory data.
Source code in datainventory/bin/app.py
15 16 17 18 19 20 21 22 23 24 |
|
inventory_import(device_id, source_path, inventory_path)
Import data into the inventory.
Source code in datainventory/bin/app.py
27 28 29 30 31 32 33 34 35 36 |
|
main()
Entry point.
Source code in datainventory/bin/app.py
50 51 52 |
|
common
Common code for Data Inventory.
ColumnType
Bases: Enum
Supported custom data type.
Source code in datainventory/common.py
35 36 37 38 39 40 41 42 43 |
|
Range
Time range for query data.
Source code in datainventory/common.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
get_range()
Return the start and end timestamp.
Source code in datainventory/common.py
30 31 32 |
|
inventory
The main module of Data Inventory.
Inventory
Data Inventory.
Source code in datainventory/inventory.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
destroy()
Destory the entire data inventory.
Source code in datainventory/inventory.py
88 89 90 91 |
|
export(dest_filename)
Export the entire data inventory.
Source code in datainventory/inventory.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
get_media_store()
Return an instance of the media store.
Source code in datainventory/inventory.py
36 37 38 39 40 41 42 43 44 45 |
|
get_model_store()
Return an instance of the model store.
Source code in datainventory/inventory.py
47 48 49 50 51 52 53 54 |
|
get_table_store()
Return an instance of the table store.
Source code in datainventory/inventory.py
56 57 58 59 60 61 62 63 64 65 |
|
import_data(source_data)
Import data into the data inventory.
Source code in datainventory/inventory.py
93 94 95 |
|
media_store
Store for multimedia data such as video, audio, and image.
Media
Bases: Base
Table definition for multimedia.
Source code in datainventory/media_store.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
__repr__()
Provie nice representation for the media type.
Source code in datainventory/media_store.py
42 43 44 45 46 47 48 49 |
|
MediaStore
Bases: InternalStore
Media Store.
Source code in datainventory/media_store.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
insert_media(file_path, media_type, copy=True)
Insert a media.
Source code in datainventory/media_store.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
query_data(query_statement=None)
Retrieve the media data.
Source code in datainventory/media_store.py
101 102 103 104 105 106 107 108 109 110 |
|
MediaType
Bases: Enum
Supporte media type.
Source code in datainventory/media_store.py
20 21 22 23 24 25 |
|
model_store
Store for machine learning models.
Model
Bases: Base
The table definition of learning models.
Source code in datainventory/model_store.py
15 16 17 18 19 20 21 |
|
ModelStore
Bases: InternalStore
Model Store.
Source code in datainventory/model_store.py
24 25 26 27 28 29 30 31 32 33 34 35 |
|
get_model(name, version)
Retrieve the model according to the name and version from database.
Source code in datainventory/model_store.py
33 34 35 |
|
table_store
Store for structured data.
TableStore
Bases: InternalStore
Table Store.
Source code in datainventory/table_store.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
create_table(table_name, columns)
Create a table.
Source code in datainventory/table_store.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
insert(table_name, values)
Insert data.
Source code in datainventory/table_store.py
54 55 56 57 58 59 60 61 62 |
|
query_data(table_name, range=None)
Query data from a given table within a time range.
Source code in datainventory/table_store.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|