Skip to main content

datamasque-python

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.

For a DataMasque instance hosted on Snowpark Container Services (SPCS) (a *.snowflakecomputing.app base_url), pass a Snowflake Programmatic Access Token as spcs_pat on DataMasqueInstanceConfig. See the usage docs for details.

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

Contributing

See CONTRIBUTING.rst for development setup, testing, and the pull request flow.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for datamasque-python 1.6.0

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

Source distribution (sdist)

Source distribution for datamasque-python 1.6.0
File Size Uploaded Provenance Actions
datamasque_python-1.6.0.tar.gz 259.1 kB With provenance Details for datamasque_python-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datamasque-python 1.6.0
File Interpreter ABI Platform Actions
datamasque_python-1.6.0-py3-none-any.whl Python 3 none any Details for datamasque_python-1.6.0-py3-none-any.whl

Total release size: 367.4 kB

Release files / datamasque_python-1.6.0.tar.gz

Download URL datamasque_python-1.6.0.tar.gz
Size 259.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d97d2320a4e802b52c3dd0a4b2b6f0d247f50d944b2f35d810f0c88ac0493481
BLAKE2b-256 checksum
How to use checksums
dd78930fbd2cecf2d5896908370d437cd2f1d242e9100b7f064e4d287894574e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / datamasque_python-1.6.0-py3-none-any.whl

Download URL datamasque_python-1.6.0-py3-none-any.whl
Size 108.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f57e6fe6857e80adad0da1d2bc33e9b46be150c0328541f70b61159805ed68a
BLAKE2b-256 checksum
How to use checksums
4e87749bb0310b7dfb48857d6e2767ea89ab591ff412d26a80ef5c3c4da11a93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for datamasque-python 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for datamasque_python-1.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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