Skip to main content

xpd

xpd is a fast, opinionated linter for Python library habits that make code slow or wrong, starting with pandas and scikit-learn. Each library gets one set of rules, written for its current version, and a small set of Python style rules runs on every file. It fixes what it can, and it is built to run after every edit a coding agent makes.

$ xpd check samples/bad.py
samples/bad.py:5:15: warning [pandas/row-loop] iterrows() builds a Series for every row. Compute on whole columns instead, such as df["a"] * df["w"]. When each row has to become a Python object, loop over itertuples() or to_dict("records").
samples/bad.py:6:5: error [pandas/chained-assignment] Chained assignment writes to a copy under copy-on-write, so the frame keeps its old values. Assign to df.loc[i, "a"] instead.
samples/bad.py:7:1: warning [pandas/no-inplace] inplace=True gives no speedup and blocks chaining. Reassign instead.
samples/bad.py:8:5: warning [pandas/merge-without-validate] merge without validate= can silently duplicate rows.
samples/bad.py:11:5: warning [pandas/concat-in-loop] out grows by one concat per pass, and each concat copies every earlier row. Collect the frames in a list and concat once after the loop.
xpd: 5 issues, 2 more with --fix --unsafe-fixes

Install

uv tool install xpd   # or: uvx xpd check .

Before version 0.7.0 the package was pdx-lint and the command was pdx.

Use

Command What it does
xpd check [paths] Lint files and folders. Exit 1 on any error, 2 if xpd can't run.
xpd check --fix Apply safe fixes, then lint. Add --unsafe-fixes to apply the rest.
xpd profile data.csv Show dtypes, nulls, unique counts and memory per column. Needs pandas.
xpd equiv old.py new.py Check that two scripts leave an equal result. Needs pandas.
xpd graph features.py Print the dataflow of step code or Apache Hamilton modules: what reads what, and what does not connect.
xpd hook Lint the file a Claude Code edit touched.
xpd skill Print the agent skill for this version.

Run xpd -h for every flag.

Skills

Three Agent Skills live in skills/. The two Python skills hold the style that a linter cannot check. They work without xpd, and they run it when it is installed.

Skill What it does
xpd When to run each xpd command. xpd skill prints it for the installed version.
python-best-practices The rules an agent follows when it writes or changes Python.
python-review Reviews a file, package or diff, and cites the rule for every finding.
npx skills add bjoernaagaard/xpd

Documentation

The full guide, including the Claude Code hook setup and how to write a rule, lives at https://bjoernaagaard.github.io/xpd/.

License

MIT or Apache-2.0, at your choice.

Metadata

Release files for xpd 0.8.0

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

Source distribution (sdist)

Source distribution for xpd 0.8.0
File Size Uploaded Provenance Actions
xpd-0.8.0.tar.gz 89.7 kB Without provenance Details for xpd-0.8.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for xpd 0.8.0
File Actions
xpd-0.8.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for xpd-0.8.0-py3-none-win_arm64.whl
xpd-0.8.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for xpd-0.8.0-py3-none-win_amd64.whl
xpd-0.8.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for xpd-0.8.0-py3-none-musllinux_1_2_x86_64.whl
xpd-0.8.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for xpd-0.8.0-py3-none-musllinux_1_2_aarch64.whl
xpd-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for xpd-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
xpd-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for xpd-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
xpd-0.8.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for xpd-0.8.0-py3-none-macosx_11_0_arm64.whl
xpd-0.8.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for xpd-0.8.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 18.7 MB

Release files / xpd-0.8.0.tar.gz

Download URL xpd-0.8.0.tar.gz
Size 89.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0582bf88b5a0cf40ca61c2ad76ee06b450e122983d0100d82f37a039d782aa85
BLAKE2b-256 checksum
How to use checksums
98b5d0dc0a2d7cb22bbc7e9a11c27a2c15a8f37655c9175db4c4e39249721bd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-win_arm64.whl

Download URL xpd-0.8.0-py3-none-win_arm64.whl
Size 2.2 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
c86afbab0125a39775a28bbf7268ecc5f6ded40c1711bd415707693ee5fb94e9
BLAKE2b-256 checksum
How to use checksums
df9f53b84666f8ad0c2b264b2562f074f668702444b850534fc751ced3ad2e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-win_amd64.whl

Download URL xpd-0.8.0-py3-none-win_amd64.whl
Size 2.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
b35c6e56d225a6981349c301bee7d76b89f5af5d0c4521307bf2ba4b693bc9ac
BLAKE2b-256 checksum
How to use checksums
c7b182394e346e2800e6725ca4834624f695f16b0bac52d38b644fa851b22a3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-musllinux_1_2_x86_64.whl

Download URL xpd-0.8.0-py3-none-musllinux_1_2_x86_64.whl
Size 2.5 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e6d16929e382fbd7ef7b61af4c01518d3d606d7fd508e105b6c576e8d6973a42
BLAKE2b-256 checksum
How to use checksums
8912f239033233bc4124fb643fe31e3cfa313f01506dae614190dcadd570de58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-musllinux_1_2_aarch64.whl

Download URL xpd-0.8.0-py3-none-musllinux_1_2_aarch64.whl
Size 2.3 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
bad49231553ce0dc049fe2e44b67e7d520d8e7ee90d2c77b19c97c55ccec51c0
BLAKE2b-256 checksum
How to use checksums
891bdfa53eff50d5b0628fcb49d19182d6621b336722f93a7249c8963133bb01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL xpd-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
eb5e4de97e510a6980579afdb411b933e4a58c938ebdbdccb96425129f4fa1fe
BLAKE2b-256 checksum
How to use checksums
efeb7e915be1b1029d92a45f314c81a8b7932b5e01f0d5d629468272cbbb7e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL xpd-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.2 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c4d2fb660d80d181b4b54306d32226412c19b674d5f8097ef025246c667107d8
BLAKE2b-256 checksum
How to use checksums
5635c3f821d0c44272b466a2a4bb5d9ce93636986518edc39dd62265a47cf4d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-macosx_11_0_arm64.whl

Download URL xpd-0.8.0-py3-none-macosx_11_0_arm64.whl
Size 2.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8bf6d298de2e0b012cc91eb3724c527d56b25b7177a1862370d4a35d0b5ecbd5
BLAKE2b-256 checksum
How to use checksums
14e1f57aa11c4a7b829b4333487965955e210d68137dc2195dee34e3a286dbaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / xpd-0.8.0-py3-none-macosx_10_12_x86_64.whl

Download URL xpd-0.8.0-py3-none-macosx_10_12_x86_64.whl
Size 2.3 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
aafd3cda3a40ee23117fb154ccd7cfab208b5e83eaf6d0ad835b27369a5f37be
BLAKE2b-256 checksum
How to use checksums
e09e4f793227cb232d3e11c5f93a16b27c1c19e9e03acf1118d40ecbc1282956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 xpd 0.8.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.

Release history Release notifications | RSS feed

This release

0.8.0 This release

9 release files No provenance

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