sing-box-bin 1.12.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ import os
2
+ import sys
3
+ from pathlib import Path
4
+
5
+ __all__ = ["get_bin_path"]
6
+
7
+ __version__ = "1.12.10"
8
+
9
+
10
+ def get_bin_path() -> Path:
11
+ base_path = Path(__file__).parent / "bin"
12
+
13
+ if sys.platform == "win32":
14
+ bin_path = base_path / "sing-box-windows-amd64.exe"
15
+ else:
16
+ bin_path = base_path / "sing-box-linux-amd64"
17
+
18
+ if not bin_path.exists():
19
+ raise FileNotFoundError(f"Binary not found at {bin_path}")
20
+
21
+ if sys.platform != "win32":
22
+ st = os.stat(bin_path)
23
+ os.chmod(bin_path, st.st_mode | 0o111)
24
+
25
+ return bin_path
Binary file
sing_box_bin/py.typed ADDED
File without changes
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: sing-box-bin
3
+ Version: 1.12.10
4
+ Summary: python template package
5
+ Project-URL: Homepage, https://github.com/aittcuszz/sing-box-bin
6
+ Project-URL: Issues, https://github.com/atticuszeller/sing-box-bin/issues
7
+ Project-URL: documentation, https://atticuszeller.github.io/sing-box-bin/
8
+ Project-URL: Changelog, https://github.com/atticuszeller/sing-box-bin/blob/main/CHANGELOG.md
9
+ Author-email: "A.J.Zeller" <hello@atticux.me>
10
+ Maintainer-email: "A.J.Zeller" <hello@atticux.me>
11
+ License: MIT License
12
+
13
+ Copyright (c) 2024 A.J.Zeller
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+ License-File: LICENSE
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Programming Language :: Python
35
+ Classifier: Programming Language :: Python :: 3 :: Only
36
+ Classifier: Programming Language :: Python :: 3.11
37
+ Classifier: Programming Language :: Python :: 3.12
38
+ Classifier: Programming Language :: Python :: 3.13
39
+ Classifier: Programming Language :: Python :: 3.14
40
+ Requires-Python: >=3.10
41
+ Description-Content-Type: text/markdown
42
+
43
+ # sing-box-bin
44
+
45
+ A Python wrapper for sing-box binary releases
46
+
47
+
48
+ ## build and bump version
49
+
50
+ ```bash
51
+ .\scripts\build.sh "vx.y.z"
52
+ bump-my-version bump --new-version "x.y.z"
53
+ git push origin main --tags
54
+ ```
55
+
56
+ ## install
57
+
58
+ ```bash
59
+ uv add sing-box-bin
60
+ ```
61
+
62
+ ## usage
63
+
64
+ ```python
65
+ from sing_box_bin import get_bin_path
66
+
67
+ >>> get_bin_path()
68
+ >>> ./.sing-box-bin/ sing-box-windows-amd64.exe
69
+ ```
@@ -0,0 +1,9 @@
1
+ sing_box_bin/__init__.py,sha256=J8fbBkbqB0nFJLV0HcxXxhE4CHhKhLbke9Py8QREkIQ,562
2
+ sing_box_bin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ sing_box_bin/bin/sing-box-linux-amd64,sha256=v0CpDr6U73YwlBmKxfiRSCaUXoIaI_Vh3gWDiZjfCb4,31482004
4
+ sing_box_bin/bin/sing-box-windows-amd64.exe,sha256=-7UDrGkVG5MO470d-hwS86ji-6xmVgGOdJpHmJZxZ4c,26274816
5
+ sing_box_bin-1.12.10.dist-info/METADATA,sha256=_6yagCStFgUgTXCAYytjqKqa4dt_Ss1xMX17A2pYfc8,2548
6
+ sing_box_bin-1.12.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
7
+ sing_box_bin-1.12.10.dist-info/entry_points.txt,sha256=dqzw2co9IDYJxV7bP6leE8tZDdvo7IXuTaOq-O2j6K8,50
8
+ sing_box_bin-1.12.10.dist-info/licenses/LICENSE,sha256=QeGTPA1ps6IxVztxQ62u7-x-oEe1S_fvleYlm5VlBc8,1067
9
+ sing_box_bin-1.12.10.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ example_cli = sing_box_bin:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 A.J.Zeller
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.