Skip to main content

Datasette plugin that masks specified database columns

Project description

datasette-mask-columns

PyPI Changelog Tests License

Datasette plugin that masks specified database columns

Installation

pip install datasette-mask-columns

This depends on plugin hook changes in a not-yet released branch of Datasette. See issue #678 for details.

Usage

In your metadata.json file add a section like this describing the database and table in which you wish to mask columns:

{
    "databases": {
        "my-database": {
            "plugins": {
                "datasette-mask-columns": {
                    "users": ["password"]
                }
            }
        }
    }
}

All SQL queries against the users table in my-database.db will now return null for the password column, no matter what value that column actually holds.

The table page for users will display the text REDACTED in the masked column. This visual hint will only be available on the table page; it will not display his text for arbitrary queries against the table.

Project details


Download files

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

Source Distribution

datasette-mask-columns-0.2.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

datasette_mask_columns-0.2.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette-mask-columns-0.2.1.tar.gz.

File metadata

  • Download URL: datasette-mask-columns-0.2.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for datasette-mask-columns-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c58c90427b4a13d64254b5359bc605ac05b0f33b920f45ef09de9a580259519a
MD5 4b7816c4bb8bdc99457ce48a59aeab2b
BLAKE2b-256 22c8dca872c05469aca4192187c969284432e5f6c028479048c2f680f4094b95

See more details on using hashes here.

File details

Details for the file datasette_mask_columns-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: datasette_mask_columns-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for datasette_mask_columns-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9474cba7096211769aad75f136596e7e86c0c94fea3e69a87e2b65d5d99bbda
MD5 249055c62db4dc236589f9725b1770f7
BLAKE2b-256 8643e50cb96cae2513b1a03bdac3992dbd75e4192de6ed8862a7d7b0a8a9b142

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page