Metadata-Version: 2.4
Name: ruff-api
Version: 0.2.1
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
Requires-Dist: attribution==1.8.0 ; extra == 'dev'
Requires-Dist: flake8==7.3.0 ; extra == 'dev'
Requires-Dist: maturin==1.10.2 ; extra == 'dev'
Requires-Dist: mypy==1.19.0 ; extra == 'dev'
Requires-Dist: pytest==8.4.2 ; extra == 'dev'
Requires-Dist: ufmt==2.8.0 ; extra == 'dev'
Requires-Dist: usort==1.0.8.post1 ; extra == 'dev'
Provides-Extra: dev
License-File: LICENSE
Summary: Experimental API for Ruff
Author-email: Amethyst Reese <amethyst@n7.gg>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Home, https://github.com/amyreese/ruff-api

# ruff-api

Experimental Python API for Ruff

[![version](https://img.shields.io/pypi/v/ruff-api.svg)](https://pypi.org/project/ruff-api)
[![license](https://img.shields.io/pypi/l/ruff-api.svg)](https://github.com/amyreese/ruff-api/blob/main/LICENSE)


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


Install
-------

```shell-session
$ pip install ruff-api
```


Usage
-----

```py
import ruff_api
```

Format the contents of a file in memory:

```py
code = ruff_api.format_string(filename, code)
```

Sort imports in memory:

```py
code = ruff_api.isort_string(filename, code)
```


License
-------

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

