SingBox converter, Python
Project description
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysingboxconverter-0.5.2.dev0.tar.gz.
File metadata
- Download URL: pysingboxconverter-0.5.2.dev0.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae94598f74e3f612636375d3642a1eb7935e2d406bc57ebddaff071fdfc5e0c7
|
|
| MD5 |
33d82ef4f3c04d9cceedf6402db3f42f
|
|
| BLAKE2b-256 |
403b4ffe3f9cae67722f673dc730378025e3d6d602483af70a81133000c089e2
|
File details
Details for the file pysingboxconverter-0.5.2.dev0-py3-none-any.whl.
File metadata
- Download URL: pysingboxconverter-0.5.2.dev0-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1927cc7b80d215e29b5836e1b0946f87f7b332e77123915cd476f0e2f61ed8a6
|
|
| MD5 |
5971a3b6ba457feacf2962db2fe68949
|
|
| BLAKE2b-256 |
ce09ccffb855c5f107be651fe99a2e7db6c91aa83f44b30ae3370b2b58420bf6
|