skillfed

dprint-py

a pluggable and configurable code formatting platform.

dprint-py v0.55.2.0 141.4K downloads/30d#11,241 on PyPI10
Permissive license MIT Active released

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-py

uv

uv add dprint-py

poetry

poetry add dprint-py

Installing 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

Programming Language :: RustTopic :: Software Development

Tags

code formattermulti-language formatterpluggable formatterconfigurable code formattingdprint wrapperformat code filescode formatting platform
code-formatterrust-bindingmulti-language

More Software Development packages