Official Python client for the DataMasque data-masking API.
Project description
Official Python client for the DataMasque platform.
DataMasque is a data masking platform that replaces sensitive data with realistic but non-production values, so teams can use production-shaped data in non-production environments without exposing PII. This package is a thin Python wrapper around the DataMasque server’s HTTP API, covering connection management, ruleset and ruleset-library CRUD, masking run lifecycle, discovery results, user administration, and license management.
Installation
pip install datamasque-python
Python 3.9 or newer is required.
Quickstart
from datamasque.client import DataMasqueClient
from datamasque.client.models.dm_instance import DataMasqueInstanceConfig
config = DataMasqueInstanceConfig(
base_url="https://datamasque.example.com",
username="api_user",
password="api_password",
)
client = DataMasqueClient(config)
client.authenticate()
for connection in client.list_connections():
print(connection.name)
Authentication is performed on the first request if authenticate() is not called explicitly, and is automatically retried once on a 401 response. client.healthcheck() is available as a lightweight readiness probe that does not consume credentials.
Error handling
All methods raise subclasses of DataMasqueException on failure:
DataMasqueApiError — the server responded with a non-2xx status (excluding 502). The triggering Response is available on the .response attribute.
DataMasqueNotReadyError — the server responded with 502, typically because it is still starting up.
DataMasqueTransportError — the request failed before any response was received (connection refused, timeout, DNS failure, SSL handshake failure, etc.).
FailedToStartError / InvalidRulesetError / InvalidLibraryError — raised by start_masking_run when the server rejects the run.
DataMasqueUserError — raised by user-management methods when the input is invalid.
Documentation
All classes and functions have docstrings and type hints.
Compiled docs are hosted at Read the Docs: datamasque-python.
Documentation for the DataMasque product, including a full API reference, can be found on the DataMasque portal.
Contributing
See CONTRIBUTING.rst for development setup, testing, and the pull request flow.
License
Apache License 2.0. See LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datamasque_python-1.0.0.tar.gz.
File metadata
- Download URL: datamasque_python-1.0.0.tar.gz
- Upload date:
- Size: 161.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2acc548c7be659c174c2af45f5a0494868c1571eb8f2c282adeb58a0a73b372c
|
|
| MD5 |
144e1ad21f5f9be69b449a333fa20671
|
|
| BLAKE2b-256 |
0b0b507ed18ee2f73e8cd01ae56955d7c84b1d13b196c190ec137d08f2fb00a4
|
Provenance
The following attestation bundles were made for datamasque_python-1.0.0.tar.gz:
Publisher:
release.yml on datamasque/datamasque-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datamasque_python-1.0.0.tar.gz -
Subject digest:
2acc548c7be659c174c2af45f5a0494868c1571eb8f2c282adeb58a0a73b372c - Sigstore transparency entry: 1354796823
- Sigstore integration time:
-
Permalink:
datamasque/datamasque-python@84cd867b835a050dabec3be06b1b2815a0641522 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/datamasque
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84cd867b835a050dabec3be06b1b2815a0641522 -
Trigger Event:
push
-
Statement type:
File details
Details for the file datamasque_python-1.0.0-py3-none-any.whl.
File metadata
- Download URL: datamasque_python-1.0.0-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1586d14e5006392d4b37ec140c0bf047da03c8e1e0c18dd30a670debf49c8b64
|
|
| MD5 |
89d0bdfcaa757dfd274ca7b555d52286
|
|
| BLAKE2b-256 |
5bd87185251764bbd3455d940383afb8a192910436c0ff917cf6cdace5e33bcd
|
Provenance
The following attestation bundles were made for datamasque_python-1.0.0-py3-none-any.whl:
Publisher:
release.yml on datamasque/datamasque-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datamasque_python-1.0.0-py3-none-any.whl -
Subject digest:
1586d14e5006392d4b37ec140c0bf047da03c8e1e0c18dd30a670debf49c8b64 - Sigstore transparency entry: 1354796858
- Sigstore integration time:
-
Permalink:
datamasque/datamasque-python@84cd867b835a050dabec3be06b1b2815a0641522 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/datamasque
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84cd867b835a050dabec3be06b1b2815a0641522 -
Trigger Event:
push
-
Statement type: