Skip to main content

The pam Secret Server SDK

The pam Secret Server Python SDK contains classes that interact with Secret Server via the REST API.

Install

python -m pip install revbits_ansible

Secret Server

With API key you can authorize the SecretServer class to fetch secrets.

Initializing SecretServer

To instantiate the SecretServer class, it requires a base_url, api_key and an optional api_path_uri (defaults to "/api/v1")

from pam.revbits_ansible.server import ServerSecret

secret_server = SecretServer("https://pam.revbits.com", api_key)

Secrets can be fetched using the get_pam_secret method, which takes a string key of the secret and, returns a decoded value :

secret = secret_server.get_pam_secret('DB_HOST')

print(f"secret: {secret}")
from pam.revbits_ansible.server import ServerSecret

secret = ServerSecret(**secret_server.get_pam_secret('DB_HOST'))

DB_HOST = secret

Create a Build Environment (optional)

The SDK requires Python 3.6 or higher.

First, ensure Python is in $PATH, then run:

# Clone the repo
git clone https://github.com/RevBits/PAM-ansible-plugin
cd PAM-ansible-plugin

# Create a virtual environment
python -m venv venv
. venv/bin/activate

# Install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt

To build the package, use Flit:

flit build

Metadata

Release files for revbits_ansible 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for revbits_ansible 1.3.1
File Size Uploaded
revbits_ansible-1.3.1.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for revbits_ansible 1.3.1
File Interpreter ABI Platform
revbits_ansible-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / revbits_ansible-1.3.1.tar.gz

Download URL revbits_ansible-1.3.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
aa2e9920944c33c152cc0450bddef2f2a9abb8191e2a623a1f76b74e8b87b110
BLAKE2b-256 checksum
How to use checksums
f35d260c2a367cafca62a465b1e16decd0f7e54c03610222fbf719cba5546f24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / revbits_ansible-1.3.1-py3-none-any.whl

Download URL revbits_ansible-1.3.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4622b68cbb559bcc820474ec13417c60e26827f4dc1ecb76417b9ed1b8dc257
BLAKE2b-256 checksum
How to use checksums
a1e89e0345cfae881b7d2ab13d60a539fd9664d16d6f8c220eb7786eafa5600f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3

2 release files

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page