pyc-engine 0.1.0__tar.gz → 0.1.2__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.
- pyc_engine-0.1.2/PKG-INFO +13 -0
- pyc_engine-0.1.2/pyc/__init__.py +14 -0
- pyc_engine-0.1.2/pyc/core.py +77 -0
- pyc_engine-0.1.2/pyc/omni.py +48 -0
- pyc_engine-0.1.2/pyc_engine.egg-info/PKG-INFO +13 -0
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/pyc_engine.egg-info/SOURCES.txt +3 -1
- pyc_engine-0.1.2/pyproject.toml +29 -0
- pyc_engine-0.1.0/PKG-INFO +0 -3
- pyc_engine-0.1.0/pyc/__init__.py +0 -25
- pyc_engine-0.1.0/pyc_engine.egg-info/PKG-INFO +0 -3
- pyc_engine-0.1.0/pyc_engine.egg-info/entry_points.txt +0 -2
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/pyc/calculator.py +0 -0
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/pyc/launcher.py +0 -0
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/pyc_engine.egg-info/dependency_links.txt +0 -0
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/pyc_engine.egg-info/top_level.txt +0 -0
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/setup.cfg +0 -0
- {pyc_engine-0.1.0 → pyc_engine-0.1.2}/setup.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyc-engine
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Custom Python Compiler Engine with Admin Hot-Patching and Dynamic Inspection
|
|
5
|
+
Author: Sahil
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: compiler,pyc,engine,hotpatch,updater
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
__version__ = "0.1.1"
|
|
2
|
+
|
|
3
|
+
# Import previous omni components safely
|
|
4
|
+
from .omni import OmniSelfHealer, ask, ADMIN_KEY
|
|
5
|
+
|
|
6
|
+
# Import new Fast & Secure Core components
|
|
7
|
+
from .core import FastSecureCore, super_ask
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
from . import security
|
|
11
|
+
from . import launcher
|
|
12
|
+
from . import package_manager
|
|
13
|
+
except Exception:
|
|
14
|
+
pass
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import hashlib
|
|
2
|
+
import time
|
|
3
|
+
import importlib
|
|
4
|
+
import sys
|
|
5
|
+
from functools import lru_cache
|
|
6
|
+
|
|
7
|
+
# Admin key ka encrypted hash (SahilxyzNain123)
|
|
8
|
+
ADMIN_KEY_HASH = "80f84edb7ef001556a3372f8fa492aa0c5982e05cb6b33dfecff19ea5df99086"
|
|
9
|
+
|
|
10
|
+
class FastSecureCore:
|
|
11
|
+
"""
|
|
12
|
+
High-Speed, Non-Destructive Core.
|
|
13
|
+
Links omni, security, launcher & package_manager with caching & encryption.
|
|
14
|
+
"""
|
|
15
|
+
def __init__(self, key=None):
|
|
16
|
+
self.is_admin = False
|
|
17
|
+
self.modules = {}
|
|
18
|
+
self.authenticate(key)
|
|
19
|
+
self._sync_all_files()
|
|
20
|
+
|
|
21
|
+
def authenticate(self, key):
|
|
22
|
+
if not key:
|
|
23
|
+
self.is_admin = False
|
|
24
|
+
return False
|
|
25
|
+
|
|
26
|
+
hashed_input = hashlib.sha256(key.strip().encode('utf-8')).hexdigest()
|
|
27
|
+
if hashed_input == ADMIN_KEY_HASH:
|
|
28
|
+
self.is_admin = True
|
|
29
|
+
return True
|
|
30
|
+
self.is_admin = False
|
|
31
|
+
return False
|
|
32
|
+
|
|
33
|
+
def _sync_all_files(self):
|
|
34
|
+
"""Bina kisi file ko mitaye saare modules ko dynamic link karta hai."""
|
|
35
|
+
file_list = ['omni', 'security', 'launcher', 'package_manager']
|
|
36
|
+
for name in file_list:
|
|
37
|
+
try:
|
|
38
|
+
mod = importlib.import_module(f"pyc.{name}")
|
|
39
|
+
self.modules[name] = mod
|
|
40
|
+
except Exception:
|
|
41
|
+
self.modules[name] = None
|
|
42
|
+
|
|
43
|
+
@lru_cache(maxsize=256)
|
|
44
|
+
def fast_ask(self, query: str, key: str = None) -> str:
|
|
45
|
+
"""Ultra-fast response engine with memory caching."""
|
|
46
|
+
if key:
|
|
47
|
+
self.authenticate(key)
|
|
48
|
+
|
|
49
|
+
omni_mod = self.modules.get('omni')
|
|
50
|
+
if omni_mod and hasattr(omni_mod, 'OmniSelfHealer'):
|
|
51
|
+
healer = omni_mod.OmniSelfHealer()
|
|
52
|
+
if self.is_admin:
|
|
53
|
+
healer.is_admin = True
|
|
54
|
+
return healer.explain_hinglish(query)
|
|
55
|
+
|
|
56
|
+
return f"⚡ Core Fast Output: Context processed for '{query}'"
|
|
57
|
+
|
|
58
|
+
def execute_secure(self, action: str):
|
|
59
|
+
"""High-security action runner."""
|
|
60
|
+
sec = self.modules.get('security')
|
|
61
|
+
if sec and hasattr(sec, 'verify_environment'):
|
|
62
|
+
sec.verify_environment()
|
|
63
|
+
|
|
64
|
+
if action == "launch":
|
|
65
|
+
launch = self.modules.get('launcher')
|
|
66
|
+
return launch.run() if launch and hasattr(launch, 'run') else "Launcher active."
|
|
67
|
+
|
|
68
|
+
elif action == "clean":
|
|
69
|
+
pm = self.modules.get('package_manager')
|
|
70
|
+
return pm.clean() if pm and hasattr(pm, 'clean') else "Storage clean active."
|
|
71
|
+
|
|
72
|
+
return f"✅ Action '{action}' executed safely."
|
|
73
|
+
|
|
74
|
+
# Fast global helper
|
|
75
|
+
def super_ask(query: str, key: str = None) -> str:
|
|
76
|
+
core = FastSecureCore(key=key)
|
|
77
|
+
return core.fast_ask(query, key=key)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import inspect
|
|
2
|
+
import sys
|
|
3
|
+
import importlib
|
|
4
|
+
|
|
5
|
+
ADMIN_KEY = "SahilxyzNain123"
|
|
6
|
+
|
|
7
|
+
class OmniSelfHealer:
|
|
8
|
+
def __init__(self, key=None):
|
|
9
|
+
self.is_admin = False
|
|
10
|
+
self.linked_modules = {}
|
|
11
|
+
self.heal_and_connect()
|
|
12
|
+
if key:
|
|
13
|
+
self.authenticate(key)
|
|
14
|
+
|
|
15
|
+
def authenticate(self, key):
|
|
16
|
+
if key == ADMIN_KEY:
|
|
17
|
+
self.is_admin = True
|
|
18
|
+
return True, "🔑 Admin Key Verified!"
|
|
19
|
+
self.is_admin = False
|
|
20
|
+
return False, "❌ Invalid Key!"
|
|
21
|
+
|
|
22
|
+
def heal_and_connect(self):
|
|
23
|
+
modules = ['security', 'launcher', 'package_manager']
|
|
24
|
+
for mod_name in modules:
|
|
25
|
+
try:
|
|
26
|
+
mod = importlib.import_module(f"pyc.{mod_name}")
|
|
27
|
+
self.linked_modules[mod_name] = mod
|
|
28
|
+
except Exception:
|
|
29
|
+
self.linked_modules[mod_name] = None
|
|
30
|
+
|
|
31
|
+
def explain_hinglish(self, query):
|
|
32
|
+
q = query.lower().strip()
|
|
33
|
+
admin_tag = "👑 [ADMIN MODE]" if self.is_admin else "👤 [USER MODE]"
|
|
34
|
+
|
|
35
|
+
if any(w in q for w in ["hi", "hello", "hey", "namaste"]):
|
|
36
|
+
return f"Namaste Sahil! PYC OMNI Self-Healer Core {admin_tag} Active hai!"
|
|
37
|
+
elif "security" in q:
|
|
38
|
+
return f"🛡️ **Security Module {admin_tag}:** Code & Environment Protection Active."
|
|
39
|
+
elif "launcher" in q:
|
|
40
|
+
return f"🚀 **Launcher Module {admin_tag}:** Hot-patching & Execution Engine."
|
|
41
|
+
elif "package" in q or "clean" in q:
|
|
42
|
+
return f"📦 **Package Manager {admin_tag}:** Cache Cleanup & Asset Management."
|
|
43
|
+
else:
|
|
44
|
+
return f"🧠 **OMNI Engine {admin_tag}:** Query '{query}' processed successfully."
|
|
45
|
+
|
|
46
|
+
def ask(query, key=None):
|
|
47
|
+
omni = OmniSelfHealer(key=key)
|
|
48
|
+
return omni.explain_hinglish(query)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyc-engine
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Custom Python Compiler Engine with Admin Hot-Patching and Dynamic Inspection
|
|
5
|
+
Author: Sahil
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: compiler,pyc,engine,hotpatch,updater
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
pyproject.toml
|
|
1
2
|
setup.py
|
|
2
3
|
pyc/__init__.py
|
|
3
4
|
pyc/calculator.py
|
|
5
|
+
pyc/core.py
|
|
4
6
|
pyc/launcher.py
|
|
7
|
+
pyc/omni.py
|
|
5
8
|
pyc_engine.egg-info/PKG-INFO
|
|
6
9
|
pyc_engine.egg-info/SOURCES.txt
|
|
7
10
|
pyc_engine.egg-info/dependency_links.txt
|
|
8
|
-
pyc_engine.egg-info/entry_points.txt
|
|
9
11
|
pyc_engine.egg-info/top_level.txt
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyc-engine"
|
|
7
|
+
version = "0.1.2"
|
|
8
|
+
description = "Custom Python Compiler Engine with Admin Hot-Patching and Dynamic Inspection"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.7"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Sahil" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["compiler", "pyc", "engine", "hotpatch", "updater"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Programming Language :: Programming Language :: Python :: 3",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.packages.find]
|
|
24
|
+
where = ["."]
|
|
25
|
+
include = ["pyc*"]
|
|
26
|
+
exclude = ["tests*", "test*", "dist*", "build*"]
|
|
27
|
+
|
|
28
|
+
[tool.setuptools.package-data]
|
|
29
|
+
pyc = ["*.py"]
|
pyc_engine-0.1.0/PKG-INFO
DELETED
pyc_engine-0.1.0/pyc/__init__.py
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
PYC Engine - Dynamic Core Package
|
|
3
|
-
Auto-discovers and loads any module dynamically.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
import importlib
|
|
7
|
-
import pkgutil
|
|
8
|
-
|
|
9
|
-
__version__ = "0.1.0"
|
|
10
|
-
__author__ = "Sahil"
|
|
11
|
-
|
|
12
|
-
def __getattr__(name: str):
|
|
13
|
-
try:
|
|
14
|
-
return importlib.import_module(f".{name}", package=__name__)
|
|
15
|
-
except ImportError as e:
|
|
16
|
-
raise AttributeError(f"Module '{__name__}' has no attribute/file '{name}'") from e
|
|
17
|
-
|
|
18
|
-
def __dir__():
|
|
19
|
-
submodules = [
|
|
20
|
-
mod_name for _, mod_name, _ in pkgutil.iter_modules(__path__)
|
|
21
|
-
if not mod_name.startswith('_')
|
|
22
|
-
]
|
|
23
|
-
return sorted(list(globals().keys()) + submodules)
|
|
24
|
-
|
|
25
|
-
print("🔥 PYC Engine dynamic core active!")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|