ruff-api 0.2.1


pip install ruff-api

  Latest version

Released: Dec 13, 2025

Project Links

Meta
Author: Amethyst Reese
Requires Python: >=3.9

Classifiers

Development Status
  • 4 - Beta

License
  • OSI Approved :: MIT License

Programming Language
  • Rust
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy
  • Python :: Free Threading :: 2 - Beta

ruff-api

Experimental Python API for Ruff

version license

NOTE: This is project is highly experimental and the API is likely to change. Pin your dependencies accordingly.

Install

$ pip install ruff-api

Usage

import ruff_api

Format the contents of a file in memory:

code = ruff_api.format_string(filename, code)

Sort imports in memory:

code = ruff_api.isort_string(filename, code)

License

ruff-api is copyright Amethyst Reese, and licensed under the MIT license.

Extras:
Dependencies: