chameleon-data
An interactive CLI that replaces selected columns of a CSV / TSV / XLSX file with fake data generated by Faker. The result is saved in the same format as the input.
Installation
Published on PyPI as chameleon-data. Requires Python 3.11 or later.
After installation, the chameleon and chameleon-example commands are available.
uv
# Install as a global CLI tool (recommended)
uv tool install chameleon-data
# Run once without installing
uvx --from chameleon-data chameleon -f data.csv
# Add as a dependency of another project
uv add chameleon-data
# Install into the current virtual environment
uv pip install chameleon-data
Upgrade / uninstall:
uv tool upgrade chameleon-data
uv tool uninstall chameleon-data
pip
pip install chameleon-data
# Upgrade / uninstall
pip install --upgrade chameleon-data
pip uninstall chameleon-data
To use it as a standalone CLI without touching other environments, pipx works too:
pipx install chameleon-data
From GitHub (development version)
uv tool install git+https://github.com/hidariutiwa/chameleon-data
pip install git+https://github.com/hidariutiwa/chameleon-data
To pin a specific version, use git+https://github.com/hidariutiwa/chameleon-data@<tag or commit>.
Usage
chameleon -f data.csv # saves to data_masked.csv
chameleon -f data.xlsx -o out.xlsx # specify the output path
chameleon -f data.tsv -l en_US -s 42 # specify locale and seed
| Option | Description |
|---|---|
-f, --filepath |
Input file (required). .csv / .tsv / .xlsx |
-o, --output |
Output file. Defaults to <filename>_masked.<suffix> |
-l, --language |
Faker locale. Defaults to ja_JP |
-s, --seed |
Random seed. Set it to get the same result every time |
-v, --version |
Show the version |
When run, you pick the columns to mask with a checkbox prompt, then choose a replacement type for each column. Each type is shown with a sample value, and you can type to filter the list.
| Group | Types |
|---|---|
| — | masking: every character becomes * (length is kept) |
| person | full_name / first_name / last_name, full_name_kana / last_name_kana / first_name_kana, email, user_name, date_of_birth, age, phone_number |
| address | full_address, zipcode, prefecture, city, street, building |
| business | company, job, url, domain, ipv4, ipv4_private |
| finance / id | credit_card_number, credit_card_expire, credit_card_security_code, bank_account, iban, uuid, passport_number, number, date |
Types the locale does not support (e.g. kana names and building outside ja_JP) are hidden from the list.
Identical values are replaced with identical fake values, so relationships between rows are preserved. Empty cells stay empty.
Sample data
chameleon-example # writes a sample to ./example/example.csv
chameleon -f example/example.csv
Development
Uses uv.
uv sync
uv run chameleon -f example/example.csv
uv build # builds a wheel and sdist into dist/
Release
Pushing a v* tag triggers GitHub Actions (.github/workflows/publish.yml), which publishes to PyPI via Trusted Publishing.
uv version --bump patch # bump the version in pyproject.toml (minor / major also work)
git commit -am "chore: release v$(uv version --short)"
git tag "v$(uv version --short)"
git push origin main --tags
License
MIT
Metadata
Release files for chameleon-data 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chameleon_data-0.3.0.tar.gz | 8.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chameleon_data-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / chameleon_data-0.3.0.tar.gz
| Download URL | chameleon_data-0.3.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
219ed7a500884367abf2a9ee3fab37ae50b0c21e49b8ca5a6316537dda36ce3d
|
|
BLAKE2b-256 checksum How to use checksums |
d20660b3d48fb7a2db24aac6ad4df94207f474ed53d56c32a94f5ccf9cb0a064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}
|
Release files / chameleon_data-0.3.0-py3-none-any.whl
| Download URL | chameleon_data-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9cbe3b96812e6dbe9fc93cfde31c16a1e32c45588a7ddaec0b659db4476f68d
|
|
BLAKE2b-256 checksum How to use checksums |
fc58f06caad7e498ad400c30c8d047f89a112141769a8adcb820dc581b0338cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}
|
Security for chameleon-data 0.3.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.