xpd
xpd is a fast, opinionated linter for Python library habits that make code slow or wrong, starting with pandas, NumPy 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.9.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 | Actions |
|---|---|---|---|---|
| xpd-0.9.0.tar.gz | 138.0 kB | Without provenance | Details for xpd-0.9.0.tar.gz |
Built distributions (wheels)
Total release size: 19.2 MB
Release files / xpd-0.9.0.tar.gz
| Download URL | xpd-0.9.0.tar.gz |
|---|---|
| Size | 138.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2d9e636af7f14dc58247ab85c3a42e619eb3feb2a70eee0dac336bc3b0bc092
|
|
BLAKE2b-256 checksum How to use checksums |
ec0432bf233509f63e429352b3064187a9dd784e08db1e609785285a051aef8d
|
| 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.9.0-py3-none-win_arm64.whl
| Download URL | xpd-0.9.0-py3-none-win_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
57773283356ba4ed3f032c9059097d973d0ae61ced569c04c85cc2434e8f06f0
|
|
BLAKE2b-256 checksum How to use checksums |
fa810e7087b38afadf6cc1fa606ef0becec6206955a95b1a2ea2b1a04fbd0cf2
|
| 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.9.0-py3-none-win_amd64.whl
| Download URL | xpd-0.9.0-py3-none-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d7a0bc0645b63f8c9ce8d784b0b2b626a16c585ceff2f0ed27ddfda0de2592b2
|
|
BLAKE2b-256 checksum How to use checksums |
4909919e99803ead71b279f498ca106550ff4093f4460dd28136e50f575bde03
|
| 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.9.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | xpd-0.9.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
a15e8c2c668df49ec4a388a371f11f9c16a8e3132a2eaa0fdd5a09b97e386dcb
|
|
BLAKE2b-256 checksum How to use checksums |
bec1ab031e1df30d23d5c87348800e2f8d658392b381bc93c4737e37cb25a5ce
|
| 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.9.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | xpd-0.9.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 |
4dc2333c77a1088c8368a784d5a10d136fb9b5027834ee80965f874dd40546c6
|
|
BLAKE2b-256 checksum How to use checksums |
f3c52cb9c5516fd9ec13729199b48dd684513146e8958195098f05cc979291fb
|
| 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.9.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | xpd-0.9.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
4f5349c7c4fc15c9b84dcbf1742a6dd4771ee2e332e8e221bf7bd10cac069d5b
|
|
BLAKE2b-256 checksum How to use checksums |
5ae4eb8ad07aff8ecec73087decff10d368e64827d1fb0991f7c19610a32eb11
|
| 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.9.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | xpd-0.9.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
bbb68b961a3935182342568244f6ecce2b46e1f405252856978de4edcfaedbfe
|
|
BLAKE2b-256 checksum How to use checksums |
2fff3caf7675a711fdc299af763db5a8b51c8de891aa05bf85fd98c391fb4ca7
|
| 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.9.0-py3-none-macosx_11_0_arm64.whl
| Download URL | xpd-0.9.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 |
646d7ac4729ef33429c33cce98d86b89a1b3383a0422aca0a05674f05cf673de
|
|
BLAKE2b-256 checksum How to use checksums |
fa049ae8351008ec25c0b02c875fbc66726327cb20f25d3716a0e80c62c45fb5
|
| 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.9.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | xpd-0.9.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b15c74bb16d3c798bccbbdc273148bf51a6943815d2961df78b8214c629e7624
|
|
BLAKE2b-256 checksum How to use checksums |
14258a6447cb9f6aed07f95e4ec34b5069852e6ca8ac393d28aaee33bc377956
|
| 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.9.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.