strongdm
strongDM SDK for Python
This is the official strongDM SDK for the Python programming language.
Learn more with our đź“šstrongDM API docs or đź““browse the SDK reference.
Installation
$ pip install strongdm
strongDM uses semantic versioning. We do not guarantee compatibility between major versions. Be sure to use version constraints to pin your dependency to the desired major version of the strongDM SDK.
Authentication
If you don't already have them you will need to generate a set of API keys, instructions are here: API Credentials
Add the keys as environment variables; the SDK will need to access these keys for every request.
$ export SDM_API_ACCESS_KEY=<YOUR ACCESS KEY>
$ export SDM_API_SECRET_KEY=<YOUR SECRET KEY>
List Users
The following code lists all registered users:
import os
import strongdm
def main():
client = strongdm.Client(os.getenv("SDM_API_ACCESS_KEY"),
os.getenv("SDM_API_SECRET_KEY"))
users = client.accounts.list('')
for user in users:
print(user)
if __name__ == "__main__":
main()
Useful Links
- Documentation: strongdm package
- Migrating from v2 to v3
- Migrating from Role Grants to Access Rules
- Examples: GitHub - strongdm/strongdm-sdk-python-examples
License
Contributing
Currently, we are not accepting pull requests directly to this repository, but our users are some of the most resourceful and ambitious folks out there. So, if you have something to contribute, find a bug, or just want to give us some feedback, please email support@strongdm.com.
1# Copyright 2020 StrongDM Inc 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15# Code generated by protogen. DO NOT EDIT. 16''' 17.. include:: ../README.md 18''' 19__docformat__ = 'restructuredtext' 20 21import sys 22import os.path 23from .models import * 24from .errors import * 25from .client import * 26from .constants import *