Skip to main content

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.

Metadata

Release files for ruff-api 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ruff-api 0.2.1
File Size Uploaded
ruff_api-0.2.1.tar.gz 35.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ruff-api 0.2.1
File
ruff_api-0.2.1-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
ruff_api-0.2.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details
ruff_api-0.2.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details
ruff_api-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
ruff_api-0.2.1-cp314-cp314t-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 Details
ruff_api-0.2.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
ruff_api-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
ruff_api-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
ruff_api-0.2.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
ruff_api-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 57.8 MB

Release files / ruff_api-0.2.1.tar.gz

Download URL ruff_api-0.2.1.tar.gz
Size 35.7 kB
Tags Source
SHA-256 checksum
How to use checksums
734a16bf9010cacbdff7da8ec434ffcedd5d78d62e55a73624977d5a69a2adb9
BLAKE2b-256 checksum
How to use checksums
ef5f7d08679778cd1e6b12b5226db70e3531eb2171e1c7773c9a85da4f3f0093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp314-cp314t-win_amd64.whl

Download URL ruff_api-0.2.1-cp314-cp314t-win_amd64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
4ee043384ef45d8d4c98b8f1f6884af1fa481ff66879aa1a5a035d21cf431774
BLAKE2b-256 checksum
How to use checksums
5b8a450308f8956788175b8444b8f27e1814edc9d19323e98a10b28f934bab32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ruff_api-0.2.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.1 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4d90d361bc564e7b90f777dde0d6c94e94ed82e55799bbcb99a9067c4c3dcb7d
BLAKE2b-256 checksum
How to use checksums
ead6adf6768a936687ff6be0abcb27e0daed6bb712ad6de02236ba604c459f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL ruff_api-0.2.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
fd71af887e44fa32255b7a60ab67b948c7e18d44e86b89f4f475e3b87876a995
BLAKE2b-256 checksum
How to use checksums
78db15a59a0069dc944edfe03a6efc22de8551954a639662b4d7139e090a0bb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl

Download URL ruff_api-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl
Size 5.6 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2f8571a87873162ea9ea322158b55cec014f0628d99866c8f14812dba874c092
BLAKE2b-256 checksum
How to use checksums
70a08394f89b220784730d08a8f149cd38c82a62c813a7b48a1bcafd228eb2e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL ruff_api-0.2.1-cp314-cp314t-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
71205bd58484a18bdf199e44f6ceeed25d9dfcb3db5b74813479196eb6be11c4
BLAKE2b-256 checksum
How to use checksums
ddcde7fd751acb5bf8e39f285ba3dc23666c2cca8f924a9f44b5959fe84a92e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp39-abi3-win_amd64.whl

Download URL ruff_api-0.2.1-cp39-abi3-win_amd64.whl
Size 5.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a2dd6b2ec1ecee6bbe375ce22d2051e9799b62bffb4f1d32bfe7b6c71c9ad522
BLAKE2b-256 checksum
How to use checksums
985c6eb1ee012c5f5380ff5706db6a99c0f5c896f690026c92dfb1fd1f2eef8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ruff_api-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4fc4eeed0f4e6bdcab9c55e0ccd5fb059f2c2f09a1df26a7a4bbdb53fdbb9905
BLAKE2b-256 checksum
How to use checksums
11d72f545a58215720b6947e565552465df9d136f5686ae0f7c6355186c12baf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL ruff_api-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.0 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0c895f58e85789373850ca04a3e99f07674d0289512507ba9da663650c3d27e1
BLAKE2b-256 checksum
How to use checksums
2b51571f5f03c95de7ea8cc82a10982c00e86240721bc35509333828ae635e0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL ruff_api-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Size 5.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0a55bec61edbb2ee79bd1296f3ff45ecca6b81badf3f9feae80b1e4f1eb56d16
BLAKE2b-256 checksum
How to use checksums
661819524decd0512114b6772ea60348d16e8f63a775fea617579b9ed345c275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / ruff_api-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL ruff_api-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
57d456a7c1078fb7de9c128f36fd1c5012521e080d322c747c07f5879c3e7216
BLAKE2b-256 checksum
How to use checksums
7291dec8c4b2fb7d72e8c517a973e2b52bf586dd26100e462caef023c2e407eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

11 release files

0.2.0

6 release files

0.1.0

31 release files

0.0.8

31 release files

0.0.6

67 release files

0.0.3

69 release files

0.0.1

41 release files

0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page