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
Create and Get a Native Role
import os
from formal_sdk import client
if __name__ == '__main__':
dataStoreId = "e092e9f7-bb67-231s-949d-a4343299b18f"
nativeRoleId = "abc"
nativeRoleSecret = "nativeSecret"
useAsDefault = True
apiKey = os.environ.get('TEST_API_KEY')
newClient = Client(apiKey)
# Create Native Role
createdRole = newClient.DataStoreClient.CreateNativeRole(dataStoreId=dataStoreId, nativeRoleId=nativeRoleId, nativeRoleSecret=nativeRoleSecret, useAsDefault=useAsDefault)
# Get Native Role
previousRole = newClient.DataStoreClient.GetNativeRole(dataStoreId=dataStoreId, nativeRoleId=nativeRoleId)
print(f'DataStoreId: {previousRole.dataStoreId}')
print(f'NativeRoleId: {previousRole.nativeRoleId}')
print(f'NativeRoleSecret: {previousRole.nativeRoleSecret}')
print(f'UseAsDefault: {previousRole.useAsDefault}')
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.4.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for formal_sdk-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4419680eb5320dcd3f8d3134b4d66aa344e486b03f3da2a96cdcf87313e70fe7 |
|
MD5 | 60d37d2c360372c2c0c792a490c1141f |
|
BLAKE2b-256 | 01d8599797ce6159e1ff8f0bbafda0712bf1c8f9be882b2649d7630b4607d0f2 |