Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datamasque_python-1.2.4.tar.gz (208.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datamasque_python-1.2.4-py3-none-any.whl (77.0 kB view details)

Uploaded Python 3

File details

Details for the file datamasque_python-1.2.4.tar.gz.

File metadata

  • Download URL: datamasque_python-1.2.4.tar.gz
  • Upload date:
  • Size: 208.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for datamasque_python-1.2.4.tar.gz
Algorithm Hash digest
SHA256 875405d1c25f800fcc26a1d46cafb5fe35d8b569ac58721edd07f23067829d3e
MD5 91a02fa7118ff388b53b27be4ad60eef
BLAKE2b-256 426aae093d00432f590aa69aaeecb9a2e18162ae0381e576f1bb84f15f95859b

See more details on using hashes here.

Provenance

The following attestation bundles were made for datamasque_python-1.2.4.tar.gz:

Publisher: release.yml on datamasque/datamasque-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datamasque_python-1.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for datamasque_python-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1b4ef8e191d425b70e7a9e8e9ddc2c90f99c21dfbfe5937876926e4a4891eb54
MD5 a42853b3d35c8c3c1ad86da84ad911da
BLAKE2b-256 82f68db810fa699f8019431a90cc41887f1e3fc36d3e6a29984a9bf255965308

See more details on using hashes here.

Provenance

The following attestation bundles were made for datamasque_python-1.2.4-py3-none-any.whl:

Publisher: release.yml on datamasque/datamasque-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.2.5

2 files

This release

1.2.4 This release

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 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