Skip to main content

xpd

xpd is a fast, opinionated linter for Python library habits that make code slow or wrong, starting with pandas, NumPy, SciPy 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: info [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.10.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.10.0
File Size Uploaded Provenance Actions
xpd-0.10.0.tar.gz 256.8 kB Without provenance Details for xpd-0.10.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for xpd 0.10.0
File Actions
xpd-0.10.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for xpd-0.10.0-py3-none-win_arm64.whl
xpd-0.10.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for xpd-0.10.0-py3-none-win_amd64.whl
xpd-0.10.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for xpd-0.10.0-py3-none-musllinux_1_2_x86_64.whl
xpd-0.10.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for xpd-0.10.0-py3-none-musllinux_1_2_aarch64.whl
xpd-0.10.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.10.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
xpd-0.10.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for xpd-0.10.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
xpd-0.10.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for xpd-0.10.0-py3-none-macosx_11_0_arm64.whl
xpd-0.10.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for xpd-0.10.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 20.3 MB

Release files / xpd-0.10.0.tar.gz

Download URL xpd-0.10.0.tar.gz
Size 256.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5384e478ba1ff3d5d5bd46101e2da2fa8c9bee54249b1f76294002f9f46bc47f
BLAKE2b-256 checksum
How to use checksums
9f2ae15356e3b0e8878da362efe8cdd6351dc326431df00e394cc9130ba636d7
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.10.0-py3-none-win_arm64.whl

Download URL xpd-0.10.0-py3-none-win_arm64.whl
Size 2.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
95ac576191d367cf6b46052681d164c031ad6bbde19e90f7dee4ec672022ff5e
BLAKE2b-256 checksum
How to use checksums
950e5cfcd4b6fe8a5f92836322bd5efd972ac6814f02c67a09e4fc1367146273
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.10.0-py3-none-win_amd64.whl

Download URL xpd-0.10.0-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
73f1ec227996a0e2f5994b1ab4c6843c84cc06607d8e6b1f627256034f27596b
BLAKE2b-256 checksum
How to use checksums
eae0fac51372b5c203eba4f5597ad145ce3219ed03b8d8f27b60c9b91450473b
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.10.0-py3-none-musllinux_1_2_x86_64.whl

Download URL xpd-0.10.0-py3-none-musllinux_1_2_x86_64.whl
Size 2.7 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
dc95c08131bd8ed1272375e7fb7a707f3a60bafc9237e55e387ded97d74a2e28
BLAKE2b-256 checksum
How to use checksums
6d3e1473be0339bb114244995c61a1068cb2ecd4c3c7c64d2e8dbe01276ebe9c
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.10.0-py3-none-musllinux_1_2_aarch64.whl

Download URL xpd-0.10.0-py3-none-musllinux_1_2_aarch64.whl
Size 2.4 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
310520a709abb59c9eb1ecc96304c4daa9611abc8ae3550fec4a469598d1f8f3
BLAKE2b-256 checksum
How to use checksums
619709134ef292238717b2e3b03e54ddfcb36b4f47d2854c11ebc69fd0771b9d
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.10.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL xpd-0.10.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.6 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3b532c9712ad9835b62013877bebdc5032009d37767270ff669911ed245a6438
BLAKE2b-256 checksum
How to use checksums
9fd75886c364915c6ca0445a8f2406e2aa35673e488af101181d113ee8ac7bec
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.10.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL xpd-0.10.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
14bc1de69fad18dd9d3ba12ec6aabebba44e2ca7a59c2ba377548d9c735d9c73
BLAKE2b-256 checksum
How to use checksums
3ee5ae6924f8b61a1a4001f44776ba3137b141c8bd4daaf1220b10ba9a144819
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.10.0-py3-none-macosx_11_0_arm64.whl

Download URL xpd-0.10.0-py3-none-macosx_11_0_arm64.whl
Size 2.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8b4dc593386cbae8755c14d74a3a740b8e963819887bc0245f87d9f10a98d617
BLAKE2b-256 checksum
How to use checksums
f7d81a4262d8104c1121a6e9e4ddbee80c5421ac84748e35a8cc69b370e99110
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.10.0-py3-none-macosx_10_12_x86_64.whl

Download URL xpd-0.10.0-py3-none-macosx_10_12_x86_64.whl
Size 2.5 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
62bc502eeff2dd703ad1f5f6bb65f3c401288d91b36a4e048e1b282d967cd77e
BLAKE2b-256 checksum
How to use checksums
b82cd7c0237ab779c645820972284889b355e2895d2fe34629cb73679ff641c6
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.10.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.10.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