Formal SDK
Project description
Formal Admin Python SDK
This is the Python SDK for the Formal Admin API.
Installing
pip install formal-sdk
Example Use
import os
from formal_sdk import Client, admin_pb2
if __name__ == '__main__':
# Inventory Tags
res = newClient.InventoryService.GetInventoryTags(
admin_pb2.GetInventoryTagsRequest(),
timeout=10,
)
# Delete Tag
res = newClient.InventoryService.DeleteInventoryTag(
admin_pb2.DeleteInventoryTagRequest(id=tagId),
timeout=10,
)
# Create Inventory Object
res = newClient.InventoryService.CreateInventoryObject(
admin_pb2.CreateInventoryObjectRequest(datastore_id=datastoreId, object_type="sub-column",
sub_column=admin_pb2.CreateInventoryObjectRequest.SubColumn(path=path, name="name", sub_type="json")),
timeout=10,
)
# Update Inventory Object Tags
res = newClient.InventoryService.UpdateInventoryObjectTags(
admin_pb2.UpdateInventoryObjectTagsRequest(datastore_id=datastoreId, path=path,
tags=[tagId]),
timeout=10,
)
# Update Column Lock Status
res = newClient.InventoryService.UpdateColumnLockStatus(
admin_pb2.UpdateColumnLockStatusRequest(datastore_id=datastoreId, path=path,
validated=True),
timeout=10,
)
res = newClient.InventoryService.UpdateColumnDataLabel(
admin_pb2.UpdateColumnDataLabelRequest(datastore_id=datastoreId, path=path,
data_label="email"),
timeout=10,
)
# Delete Inventory Object
res = newClient.InventoryService.DeleteInventoryObject(
admin_pb2.DeleteInventoryObjectRequest(
datastore_id=datastoreId, path=path),
timeout=10,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
formal-sdk-0.0.8.tar.gz
(14.0 kB
view hashes)
Built Distribution
formal_sdk-0.0.8-py3-none-any.whl
(15.3 kB
view hashes)
Close
Hashes for formal_sdk-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce2618039edcabfb8b48eca2591fc24bea11131d5f4c7df64feb8c158d966153 |
|
MD5 | e82cbd4da2b7202a280e260dfeab47a4 |
|
BLAKE2b-256 | 0cabce863e43fcb96a227ae415ca2cfc1b0df30d1b0cfa5e45e72693283df296 |