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
import formal_sdk
if __name__ == '__main__':
dataStoreId = "e092e9f7-bb67-231s-949d-a4343299b18f"
nativeRoleId = "abc"
nativeRoleSecret = "nativeSecret"
useAsDefault = True
apiKey = os.environ.get('TEST_API_KEY')
newClient = formal_sdk.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.6.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for formal_sdk-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a366896c9f5cc1c318411dc1a615834d3139d632f6ca52918f467200b825c14c |
|
MD5 | 503296b881f0785dc5d487f0047cb0be |
|
BLAKE2b-256 | 3693ce9fc57f32208b99228107466b5a304c4a6876e5e22a4350268e514da224 |