# SingBox Converter
The code are refactored from [Toperlock/sing-box-subscribe](https://github.com/Toperlock/sing-box-subscribe) See [Documentation](https://github.com/Toperlock/sing-box-subscribe/blob/main/instructions/README.md).
## How to install
```bash
pip install PySingBoxConverter
```
## Use in commandline
#### Create a `providers.json` from [`providers-example.json`](https://raw.githubusercontent.com/dzhuang/sing-box-subscribe/main/providers-example.json):
```bash
cp providers-example.json providers.json
vi providers.json
```
#### Then run
```bash
singbox_convert -t 1 -o config1.json
```
## Use in python code systematically
```python
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:
- [Toperlock/sing-box-subscribe](https://github.com/Toperlock/sing-box-subscribe)
- [gg4924/sing-box-subscribe](https://github.com/gg4924/sing-box-subscribe)
Raw data
{
"_id": null,
"home_page": "",
"name": "PySingBoxConverter",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "singbox converter clash subconverter",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/12/9d/570f73e3a85834f41de315cfea3c6f82201bd87b233b0382862adf822950/PySingBoxConverter-0.4.3.dev0.tar.gz",
"platform": null,
"description": "# SingBox Converter\n\nThe code are refactored from [Toperlock/sing-box-subscribe](https://github.com/Toperlock/sing-box-subscribe) See [Documentation](https://github.com/Toperlock/sing-box-subscribe/blob/main/instructions/README.md).\n\n## How to install\n\n```bash\npip install PySingBoxConverter\n```\n\n## Use in commandline\n\n#### Create a `providers.json` from [`providers-example.json`](https://raw.githubusercontent.com/dzhuang/sing-box-subscribe/main/providers-example.json):\n\n```bash\ncp providers-example.json providers.json\n\nvi providers.json\n```\n\n#### Then run\n\n```bash\nsingbox_convert -t 1 -o config1.json\n```\n\n## Use in python code systematically\n\n```python\nfrom singbox_converter import SingBoxConverter\n\nconverter = SingBoxConverter(\n providers_config=\"/path/to/providers.json\",\n template=\"/path/to/template\",\n fetch_sub_ua=\"clash.meta\",\n # fetch_sub_fallback_ua=\"clash\",\n # export_config_folder=\"\",\n # export_config_name=\"my_config.json\",\n # auto_fix_empty_outbound=True,\n)\n\nprint(converter.singbox_config)\n\nconverter.export_config(\n path=\"/path/to/output/config\",\n # nodes_only=True\n)\n\n```\n\n\n## Thanks\nCredit goes to:\n- [Toperlock/sing-box-subscribe](https://github.com/Toperlock/sing-box-subscribe)\n- [gg4924/sing-box-subscribe](https://github.com/gg4924/sing-box-subscribe)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "SingBox converter, Python",
"version": "0.4.3.dev0",
"project_urls": null,
"split_keywords": [
"singbox",
"converter",
"clash",
"subconverter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b1b4abd380603489dd05a30dc5b4197b0e896a597ad5d87aea33815e93c1955d",
"md5": "32d7dee752b828d53ccaaaf08e472009",
"sha256": "8a27dcbbd2d59869c7feb57063827f43a47479016ba2127fe5cbcee416eb776a"
},
"downloads": -1,
"filename": "PySingBoxConverter-0.4.3.dev0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "32d7dee752b828d53ccaaaf08e472009",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 46379,
"upload_time": "2024-01-04T18:23:10",
"upload_time_iso_8601": "2024-01-04T18:23:10.545266Z",
"url": "https://files.pythonhosted.org/packages/b1/b4/abd380603489dd05a30dc5b4197b0e896a597ad5d87aea33815e93c1955d/PySingBoxConverter-0.4.3.dev0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "129d570f73e3a85834f41de315cfea3c6f82201bd87b233b0382862adf822950",
"md5": "779857cd38fc73c54eadb65e9ec6e785",
"sha256": "b7ab7d01609fdf3ecd9fb31d6b78d2e011587e0708a6be9f614157801d0603f9"
},
"downloads": -1,
"filename": "PySingBoxConverter-0.4.3.dev0.tar.gz",
"has_sig": false,
"md5_digest": "779857cd38fc73c54eadb65e9ec6e785",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29857,
"upload_time": "2024-01-04T18:23:11",
"upload_time_iso_8601": "2024-01-04T18:23:11.656168Z",
"url": "https://files.pythonhosted.org/packages/12/9d/570f73e3a85834f41de315cfea3c6f82201bd87b233b0382862adf822950/PySingBoxConverter-0.4.3.dev0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-04 18:23:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pysingboxconverter"
}