aotpkg 1.0.0__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,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: aotpkg
3
+ Version: 1.0.0
4
+ Summary: Automatic Python package installer
5
+ Author: Paras
6
+ Requires-Python: >=3.7
@@ -0,0 +1,6 @@
1
+ aotpy/__init__.py,sha256=8EfCfw3pmo_0nyL8xlLwxprRs7Q8RznK7HDIpWvqWNk,21
2
+ aotpy/core.py,sha256=MSde-LrSXKcNZHGoacjW0n82r4gq9IBL637auKuJAHw,921
3
+ aotpkg-1.0.0.dist-info/METADATA,sha256=4Ts3QBNS1MBUjo6waOvOhvisozhCZ67xZX9CtRIzAhw,137
4
+ aotpkg-1.0.0.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
5
+ aotpkg-1.0.0.dist-info/top_level.txt,sha256=K0iYi6oz6ZYmoBMVZwvWm7O5z_5vINUVe2Q9gBX9HBQ,6
6
+ aotpkg-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ aotpy
aotpy/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .core import pkg
aotpy/core.py ADDED
@@ -0,0 +1,38 @@
1
+ import builtins
2
+ import subprocess
3
+ import sys
4
+
5
+ _real_import = builtins.__import__
6
+
7
+ package_map = {
8
+ "bs4": "beautifulsoup4",
9
+ "cv2": "opencv-python",
10
+ "PIL": "pillow",
11
+ "sklearn": "scikit-learn",
12
+ "Crypto": "pycryptodome"
13
+ }
14
+
15
+ def auto_import(name,*args,**kwargs):
16
+ try:
17
+ return _real_import(name,*args,**kwargs)
18
+ except ModuleNotFoundError:
19
+ pkg = package_map.get(name,name)
20
+ subprocess.call([sys.executable,"-m","pip","install",pkg])
21
+ return _real_import(name,*args,**kwargs)
22
+
23
+ builtins.__import__ = auto_import
24
+
25
+
26
+ class pkg:
27
+
28
+ @staticmethod
29
+ def banner():
30
+ print("""
31
+ ╔══════════════════╗
32
+ ║ AOTPY ║
33
+ ╚══════════════════╝
34
+
35
+ Telegram : https://t.me/Aotpy
36
+ Channel : https://t.me/ObitoStuffs
37
+ Portfolio : https://Aotpy.vercel.app
38
+ """)