Skip to main content

chameleon-data

CSV / TSV / XLSX ファイルの列を選んで、Faker で生成したダミーデータに置き換える対話型 CLI です。結果は元と同じ形式で保存されます。

インストール

Python 3.11 以上が必要です。

# CLI ツールとしてインストール (おすすめ)
uv tool install chameleon-data

# インストールせずに 1 回だけ実行
uvx --from chameleon-data chameleon -f data.csv

# 他プロジェクトの依存として追加
uv add chameleon-data
pip install chameleon-data

最新の開発版は GitHub から直接インストールできます。

uv tool install git+https://github.com/hidariutiwa/chameleon-data

GitHub 版で特定のバージョンに固定したい場合は git+https://github.com/hidariutiwa/chameleon-data@<tag or commit> のように指定します。

アップデート / アンインストール:

uv tool upgrade chameleon-data
uv tool uninstall chameleon-data

使い方

chameleon -f data.csv                 # data_masked.csv に保存
chameleon -f data.xlsx -o out.xlsx    # 出力先を指定
chameleon -f data.tsv -l en_US -s 42  # ロケールとシードを指定
オプション 説明
-f, --filepath 入力ファイル (必須)。.csv / .tsv / .xlsx
-o, --output 出力ファイル。デフォルトは <ファイル名>_masked.<拡張子>
-l, --language Faker のロケール。デフォルトは ja_JP
-s, --seed 乱数シード。指定すると毎回同じ結果になります
-v, --version バージョンを表示

実行すると、マスクする列をチェックボックスで選び、列ごとに置き換え方を選択します。

種類 内容
masking すべての文字を * に置き換え (文字数は維持)
full_name / first_name / last_name 氏名
full_address 住所
zipcode 郵便番号
phone_number 電話番号

同じ値は同じダミー値に置き換わるため、行同士の対応関係は保たれます。空セルは空のままです。

サンプルデータ

chameleon-example   # ./example/example.csv にサンプルを生成
chameleon -f example/example.csv

開発

uv を使います。

uv sync
uv run chameleon -f example/example.csv
uv build   # dist/ に wheel と sdist を作成

リリース

v* タグを push すると GitHub Actions (.github/workflows/publish.yml) が PyPI に公開します (Trusted Publishing)。

uv version --bump patch   # pyproject.toml の version を更新 (minor / major も可)
git commit -am "chore: release v$(uv version --short)"
git tag "v$(uv version --short)"
git push origin main --tags

ライセンス

MIT

Metadata

Release files for chameleon-data 0.1.1

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

Source distribution (sdist)

Source distribution for chameleon-data 0.1.1
File Size Uploaded Provenance
chameleon_data-0.1.1.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chameleon-data 0.1.1
File Interpreter ABI Platform
chameleon_data-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / chameleon_data-0.1.1.tar.gz

Download URL chameleon_data-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9d4c64acb4f8fa78b4e1a58e05b980b56f9abe4ee7ddb6b84f9a530e89ac9236
BLAKE2b-256 checksum
How to use checksums
0dfe0ffade08c44daf5894916510b2ceab9953822da6b4d30cc4180492e5b7a6
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.1.1-py3-none-any.whl

Download URL chameleon_data-0.1.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4843e23f34c81d75a37289ba1f0525ebd7245d034e1cffbb76e3a842fab377b6
BLAKE2b-256 checksum
How to use checksums
474a939e638fedee35025ff26c6b6715572298079991e61bf7a25fa16ee2e9f4
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.1.1

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.

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