Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SingBox Converter

The code are refactored from Toperlock/sing-box-subscribe See Documentation.

How to install

pip install PySingBoxConverter

Use in commandline

Create a providers.json from providers-example.json:

cp providers-example.json providers.json

vi providers.json

Then run

singbox_convert -t 1 -o config1.json

Use in python code systematically

from singbox_converter import SingBoxConverter

converter = SingBoxConverter(
    providers_config="/path/to/providers.json",
    template="/path/to/template",
    fetch_sub_ua="clash.meta",
    # fetch_sub_fallback_ua="clash",
    # export_config_folder="",
    # export_config_name="my_config.json",
    # auto_fix_empty_outbound=True,
)

print(converter.singbox_config)

converter.export_config(
    path="/path/to/output/config",
    # nodes_only=True
)

Thanks

Credit goes to:

Metadata

Release files for PySingBoxConverter 0.5.2.dev0

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

Source distribution (sdist)

Source distribution for PySingBoxConverter 0.5.2.dev0
File Size Uploaded
pysingboxconverter-0.5.2.dev0.tar.gz 30.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PySingBoxConverter 0.5.2.dev0
File Interpreter ABI Platform
pysingboxconverter-0.5.2.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 76.8 kB

Release files / pysingboxconverter-0.5.2.dev0.tar.gz

Download URL pysingboxconverter-0.5.2.dev0.tar.gz
Size 30.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ae94598f74e3f612636375d3642a1eb7935e2d406bc57ebddaff071fdfc5e0c7
BLAKE2b-256 checksum
How to use checksums
403b4ffe3f9cae67722f673dc730378025e3d6d602483af70a81133000c089e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / pysingboxconverter-0.5.2.dev0-py3-none-any.whl

Download URL pysingboxconverter-0.5.2.dev0-py3-none-any.whl
Size 46.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1927cc7b80d215e29b5836e1b0946f87f7b332e77123915cd476f0e2f61ed8a6
BLAKE2b-256 checksum
How to use checksums
ce09ccffb855c5f107be651fe99a2e7db6c91aa83f44b30ae3370b2b58420bf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2
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