pdfmasker
Mask sensitive text in PDFs.
Usage
from pdfmasker import mask_pdf
pdf_bytes = open("paystub.pdf", "rb").read()
result = mask_pdf(pdf_bytes, patterns=["Jane Doe", "123-45-6789"])
result.pdf # bytes — the masked PDF
result.counts # {"Jane Doe": 2, "123-45-6789": 1}
mask_with controls the replacement string; omit it (or pass None) to use the default mask (a run of X matching
each target's length):
mask_pdf(pdf_bytes, patterns=["Jane Doe"], mask_with="[REDACTED]")
Errors raise pdfmasker.MaskError.
Contributing
The architecture, repository layout, setup, dev commands (make help), the build/cross-build model, and the release
flow all live in CONTRIBUTING.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 pdfmasker-0.0.1.tar.gz.
File metadata
- Download URL: pdfmasker-0.0.1.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21c3afef87f347436131766583593e32838d57c38cd995d74637319bc0fdab3
|
|
| MD5 |
e62fc49281b22cc1e470faf339c51445
|
|
| BLAKE2b-256 |
a464f32cb98fa213e6daa98e1a85f87388d311c82331f258405a36492c3efc8d
|
File details
Details for the file pdfmasker-0.0.1-py3-none-win_amd64.whl.
File metadata
- Download URL: pdfmasker-0.0.1-py3-none-win_amd64.whl
- Upload date:
- Size: 9.2 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e859c453d2934667a481be6d7119c11b8e2d34de6c1f097df8f20b03b0e1bf4
|
|
| MD5 |
3fa58090f2999349061a97678c63d960
|
|
| BLAKE2b-256 |
9c882256f90305ea46a10496bf3a3619f0824c545d52f846555c310dc003a47b
|
File details
Details for the file pdfmasker-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pdfmasker-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f15c1bef94a46b13456257358f61f755b2b61d4ceee6fdbeec29c2021b1a47be
|
|
| MD5 |
aab95f6658a1565bb0d102c1c2be744b
|
|
| BLAKE2b-256 |
11310a20e3f916f09d94d55cdeb1465a593774bcf571511188ca9767527e2b12
|
File details
Details for the file pdfmasker-0.0.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pdfmasker-0.0.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 8.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bf5faaa5e0ae86c2429df5f87031269e3a787636af3d1aede0e817b209e1c86
|
|
| MD5 |
9f5f05105d3257dc75a4e51c07023e43
|
|
| BLAKE2b-256 |
f6afb7992625b21268b9c7e7840e40e678e6fe8400f431f3226e0bc08eba9d9f
|
File details
Details for the file pdfmasker-0.0.1-py3-none-macosx_11_0_x86_64.whl.
File metadata
- Download URL: pdfmasker-0.0.1-py3-none-macosx_11_0_x86_64.whl
- Upload date:
- Size: 9.6 MB
- Tags: Python 3, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dcb3b06735c3046fb73f5616475f8f8e7c519e8d38a19234bc58f0e51e829ef
|
|
| MD5 |
22d8feb2b5e482735fa6121e70ac95b3
|
|
| BLAKE2b-256 |
99943520c0eb5a46838e1a332f801a597163243d50006f5a25f8a56e1fa02011
|
File details
Details for the file pdfmasker-0.0.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: pdfmasker-0.0.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 9.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b097b2dc9daa24b8b4d645d050ae9bf05a21010df5709e92e2fe46343be30145
|
|
| MD5 |
121f3d199ae783e19bc5c1ce60181c9d
|
|
| BLAKE2b-256 |
493f754d48feeca2a404d894c1c3f6556e4c422d3dfd26a25919d32f094df25d
|