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.2

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.2
File Size Uploaded Provenance Actions
xpd-0.10.2.tar.gz 257.0 kB Without provenance Details for xpd-0.10.2.tar.gz

Built distributions (wheels)

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

Total release size: 20.3 MB

Release files / xpd-0.10.2.tar.gz

Download URL xpd-0.10.2.tar.gz
Size 257.0 kB
Tags Source
SHA-256 checksum
How to use checksums
db3d121549bfa3f76eeec4a0ca2f879a66a80b4aad787a2c1b60381969651e89
BLAKE2b-256 checksum
How to use checksums
f38e5b2e93bef10c1f6d8e268a3c7e58fcf76e865ee418a4ec7d93995243a23e
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.2-py3-none-win_arm64.whl

Download URL xpd-0.10.2-py3-none-win_arm64.whl
Size 2.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
b10efca66d23540bbaf38b130e4c441cd137a68d1322417a778055d3b7d6a4ef
BLAKE2b-256 checksum
How to use checksums
ee65b2171963546aa0ac9f1fc36f320af873348dd00d08b0a15a141089b47607
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.2-py3-none-win_amd64.whl

Download URL xpd-0.10.2-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4290deecb1f8488c155a146da4c694cd62f1a0d7a5f85a116d41bfeeaff413a8
BLAKE2b-256 checksum
How to use checksums
d41af49ddca199a98181100212654d66b9d17b7ad5484bf410647e510a35022e
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.2-py3-none-musllinux_1_2_x86_64.whl

Download URL xpd-0.10.2-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
296ba9cb9208225b1b18e0714e3a4b0252e71e5b3e41125b30dfac0b501cc374
BLAKE2b-256 checksum
How to use checksums
7d2f02a697d531958d7f2c8ab9e847ea939c58bedb51f67deb721df2626262e9
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.2-py3-none-musllinux_1_2_aarch64.whl

Download URL xpd-0.10.2-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
06e15ed0138a29b1a6eac6be07e162fb474a46599eb1456c652c6fdd59ddc803
BLAKE2b-256 checksum
How to use checksums
31d954ad04ecdf830cf9997c34ea081db2f6c07eb776f090facd9dcd6d21e0b3
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.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL xpd-0.10.2-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
a9ee8b805d4dae7bd31a6e7ed14b90e8cdc3c4ffdbcd388e62e55e8882b6480e
BLAKE2b-256 checksum
How to use checksums
4e60273e4dc724f68924fcde72881cffa3031b7490a503dccc4e35ef9c0a3a89
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.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL xpd-0.10.2-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
57f554d507e405e991976d0159bfed07e91bda6ee49f39da4d20c526cba3e313
BLAKE2b-256 checksum
How to use checksums
f96c9bdf84adfdcc2c6f4ddbd580f0e3128331fc2565004e2abe37c1d65bb090
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.2-py3-none-macosx_11_0_arm64.whl

Download URL xpd-0.10.2-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
6da29dfd4ee3a1b2dcb600c2a8e017bdd1d553c0a0fc7da67aa5605760879d39
BLAKE2b-256 checksum
How to use checksums
a207d9ffa9b4fa1fe919302f6c1ebf7f365aa05b3b385012ffc44afa8343d230
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.2-py3-none-macosx_10_12_x86_64.whl

Download URL xpd-0.10.2-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
4e7aa686445b7ca941c6141beaaaf3462786b345014add4caa8f1425ec31fcac
BLAKE2b-256 checksum
How to use checksums
d8d9840caadc0bef9a23e29c2984e31999099d4135fc866a848a62d1f5e9507c
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.2

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.2 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