Skip to main content

PyDPlus

A Python toolset for the RSA® ID Plus cloud authentication platform.

Latest Stable Release PyPI
Latest Pre-release PyPI
Supported Versions (Stable Release) PyPI - Python Versions Supported (Stable Release)
Commits Since Latest Release GitHub commits since latest release
Build Status GitHub Workflow Status
Code Coverage Codecov - Code Coverage
Documentation Documentation Status
Security Audits Bandit
License License (GitHub)
Issues Issues (GitHub)
Pull Requests Pull Requests (GitHub)

Installation

[!IMPORTANT] PyDPlus 2.0.0 and newer require Python 3.12+.
PyDPlus 1.0.1 is the final release line that supports Python 3.9.

Install from PyPI:

python -m pip install --upgrade pydplus

Install from source:

git clone https://github.com/jeffshurtliff/pydplus.git
cd pydplus
poetry install

Changelog

The changelog can be found in the documentation.

Usage

PyDPlus is designed for Python-based administration workflows in RSA ID Plus tenants, including:

  • user lifecycle automation (lookup, disable, mark for deletion)
  • admin reporting and audit integrations
  • helpdesk and identity-operations scripting

1) Import the package

from pydplus import PyDPlus, constants as const

2) Instantiate the client (OAuth example)

pydplus.PyDPlus supports both OAuth and Legacy credentials. OAuth (Private Key JWT) is recommended for new usage.

from pydplus import PyDPlus, constants as const

OAUTH_SCOPE = [
    const.OAUTH_SCOPES.USER_READ,
    const.OAUTH_SCOPES.USER_MANAGE,
]

pydp = PyDPlus(
    connection_type="oauth",
    base_admin_url="https://example-company.access.securid.com",
    oauth_client_id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    oauth_private_key="/path/to/oauth-private-key.jwk",
    oauth_scope=OAUTH_SCOPE,
)

Legacy API authentication is also supported. See the Authentication guide for both patterns.

3) Define OAuth scopes (three practical options)

  1. Configure default scope permissions in the OAuth client settings in the RSA Cloud Administration Console.
  2. Define scopes explicitly in your code/helper/env configuration (manual string values or constants like const.OAUTH_SCOPES.USER_READ grouped in an OAUTH_SCOPE variable).
  3. Use scope presets to apply scope bundles (for example user_read_only or group_read_only) via oauth_scope_preset (argument), connection.oauth.scope_preset (helper setting), or PYDPLUS_OAUTH_SCOPE_PRESET (environment variable).

In PyDPlus, keep oauth_scope explicitly defined (directly, helper file, or environment variable) so token requests remain deterministic and validated.

Presets are additive and merged with explicit scopes:

pydp = PyDPlus(
    connection_type="oauth",
    base_admin_url="https://example-company.access.securid.com",
    oauth_client_id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    oauth_private_key="/path/to/oauth-private-key.jwk",
    oauth_scope=const.OAUTH_SCOPES.USER_MANAGE,
    oauth_scope_preset=("user_read_only", "group_read_only"),
)

4) Run an API operation

user_id = pydp.users.get_user_id(email="john.doe@example.com")
response = pydp.users.disable_user(user_id=user_id)

For deeper coverage, see:

Documentation

The documentation is located here: https://pydplus.readthedocs.io/en/stable/

License

MIT License

Reporting Issues

Issues can be reported within the GitHub repository.

Contributing

Contributions are welcome and appreciated, including bug fixes, documentation improvements, tests, and feature work. For full contribution requirements and workflows, please see CONTRIBUTING.md.

Development Quality Checks

This repository uses Ruff for linting, import sorting, and formatting. The standard maximum line length for this package is 130 characters.

Line-length exceptions should be rare and limited to comments or special cases where wrapping harms readability. When an exception is required, use a targeted per-line # noqa: E501 comment.

poetry run ruff check .
poetry run ruff check . --fix
poetry run ruff format .
poetry run ruff format . --check

These checks are enforced in CI via .github/workflows/ci.yml.

Donations

If you would like to donate to this project then you can do so using this PayPal link.

Disclaimer

This package is considered unofficial and is in no way endorsed or supported by RSA Security LLC.

Metadata

Release files for pydplus 2.0.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 pydplus 2.0.1
File Size Uploaded
pydplus-2.0.1.tar.gz 62.1 kB Details

Built distribution (wheel)

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

Total release size: 129.7 kB

Release files / pydplus-2.0.1.tar.gz

Download URL pydplus-2.0.1.tar.gz
Size 62.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ccb488ae4a6af0e03b8f800a5b8afa01f2c8dee65276867479141cdadf938fdc
BLAKE2b-256 checksum
How to use checksums
8de440ddaeeaef677bef6298d03de5cf6bcfad7dc8c5e37ed23cd2020b357642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release files / pydplus-2.0.1-py3-none-any.whl

Download URL pydplus-2.0.1-py3-none-any.whl
Size 67.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62cbac8deb77a8ac3c644e0c67b5f747bd9b9798e76c50600f0c93e23f46ddc4
BLAKE2b-256 checksum
How to use checksums
a39516f213c695ce556e5c004f3d02b789b3a5e450a3a89be8c68d56e3be8568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release history Release notifications | RSS feed

2.1.0

2 release files

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

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