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 = ""
nativeRoleId = ""
nativeRoleSecret = ""
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}')
# Get sidecar tls certificate and private key
sidecarId = ""
certificate, privateKey, fullSecret = newClient.SidecarClient.GetTLSCertificate(sidecarId)
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.9.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for formal_sdk-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4dd8a9a4573c9e1d25c8d56ddb90de2fa14416c6e6afec4fdd929843fa8364f |
|
MD5 | 5b07943431224e1c6f15628854e0e3ec |
|
BLAKE2b-256 | bc4818850265bf3f8709331e162687cd44a96a7b08bf390a62ead9b51bc960b9 |