dprint-py
a pluggable and configurable code formatting platform.
What it is and what it does
dprint-py packages the dprint code formatter for Python environments. dprint is a pluggable formatting platform designed to handle multiple programming languages and file types through a single tool, with configuration-driven behavior. The package provides Python bindings to the underlying dprint engine, which is written in Rust.
You install it as a standard Python package and call its formatting functions from Python code. It has no runtime Python dependencies, relying instead on pre-compiled binaries for your platform. The wrapper lets you integrate dprint's formatting capabilities into Python workflows, scripts, or applications without managing a separate dprint binary.
Use it for:
- Format code in multiple languages as part of a Python-based CI/CD pipeline
- Integrate code formatting into a Python development tool or IDE plugin
- Batch-format project files across different file types using a single configuration
- Enforce consistent code style in a polyglot codebase from a Python script
- Add formatting capabilities to a Python linting or code-quality tool
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dprint-py is a Python wrapper for dprint, a pluggable and configurable code formatting platform that can format multiple file types through a unified interface.
Yes, if you need multi-language code formatting in a Python environment. The package is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Medium install friction is typical for compiled packages and should not deter use. Verify that dprint supports the file types you need before committing.
Install
dprint-py on PyPI
pip
pip install dprint-pyuv
uv add dprint-pypoetry
poetry add dprint-pyInstalling dprint-py
Before you install
Medium install friction due to platform-specific wheels (macOS arm64/x86_64, Linux aarch64/x86_64, Windows amd64/arm64). Active maintenance with a release 30 days ago and recent repository activity.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute dprint-py freely provided you include the license notice.
Quickstart
pip install dprint-py
import dprint
# Format a file or string
formatted = dprint.format_text(code_text, file_type='typescript')
Verify before relying
- Specific file types and languages supported by this version of dprint
- Configuration file format and available formatting options
- Performance characteristics and typical use patterns
- Whether this is a maintained fork or official PyPI distribution
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.0) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 30 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 141,410/month — #11,241 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dprint_py-0.55.2.0-py3-none-macosx_11_0_arm64.whl; dprint_py-0.55.2.0-py3-none-macosx_11_0_x86_64.whl; dprint_py-0.55.2.0-py3-none-manylinux_2_17_aarch64.whl; dprint_py-0.55.2.0-py3-none-manylinux_2_17_x86_64.musllinux_1_1_x86_64.whl; dprint_py-0.55.2.0-py3-none-manylinux_2_17_x86_64.whl; dprint_py-0.55.2.0-py3-none-win_amd64.whl; dprint_py-0.55.2.0-py3-none-win_arm64.whl
Keywords: code-formatter, formatter
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
pyinkPyink is a Python code formatter forked from…
permissive · top 15,000 on PyPI
clang-formatPackages the clang-format code formatter as a…
permissive · top 5,000 on PyPI
objprintobjprint provides functions to print Python…
permissive · top 5,000 on PyPI
flitFlit is a Python packaging tool that simplifies…
permissive · top 5,000 on PyPI
ruff-formatProvides Python bindings to Ruff's code…
permissive · top 15,000 on PyPI
pytest-printAdds fixtures to pytest that print messages…
permissive · top 15,000 on PyPI
dict2xmlConverts Python dictionaries into XML strings…
permissive · top 5,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI