Metadata-Version: 2.1
Name: formal-sdk
Version: 0.0.8
Summary: Formal SDK
Author-email: Formal <hello@joinformal.com>
License: Copyright (c) 2018 The Python Packaging Authority
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/formalco
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE



# Formal Admin Python SDK


This is the Python SDK for the Formal Admin API.


## Installing


    pip install formal-sdk


## Example Use

```python
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,
    )
