Skip to main content

Clash Controller API

Async Python client for Clash-compatible external controller APIs.

The client currently targets Clash, Clash Premium, Clash Meta, Mihomo, clash-rs, and sing-box's Clash API compatibility layer. Endpoint capabilities are detected at runtime because support differs between cores.

Installation

python -m pip install clash-controller-api

The distribution name is clash-controller-api; the import name is clash_controller_api. The caller owns the aiohttp.ClientSession passed to ClashAPI and remains responsible for closing it.

Development

Python 3.11 or newer is required.

python -m pip install -e ".[test]"
pytest

Run the pinned real-core contract against all supported cores with:

python tests/run.py system

Metadata

Release files for clash-controller-api 0.1.0

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

Source distribution (sdist)

Source distribution for clash-controller-api 0.1.0
File Size Uploaded
clash_controller_api-0.1.0.tar.gz 18.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clash-controller-api 0.1.0
File Interpreter ABI Platform
clash_controller_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / clash_controller_api-0.1.0.tar.gz

Download URL clash_controller_api-0.1.0.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
89a53af93a42d85bed04b9a5c7b3b2526f2374955fbf18aa6718db43536f249a
BLAKE2b-256 checksum
How to use checksums
24075302ea0deb077c12a6867d94d8d8a07ddfd36eacf022f7b0df4f44707693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / clash_controller_api-0.1.0-py3-none-any.whl

Download URL clash_controller_api-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25950313d0b528b30b3b2ad0714c75f6c0f9fb31370b05ab3b1c0a9a90aa4225
BLAKE2b-256 checksum
How to use checksums
79ca451af2a86b26b2a0390f90df990cd02b966541b49cf816878d451d5f6acf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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