hython 1.0.2__tar.gz → 1.0.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hython
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: The ultimate high-performance utility framework for Python, powered by fasthardware.
5
5
  Author: Choi Woongyo
6
6
  Author-email: chldnsry1214@gmail.com
@@ -21,6 +21,7 @@ def deploy():
21
21
  if not pypi_token:
22
22
  print("❌ ERROR: Environment variable 'PYPI_TOKEN' is missing.")
23
23
  print("💡 Action: Set your token in the terminal first:")
24
+ pypi_token = input()
24
25
  print(" Windows (PowerShell): $env:PYPI_TOKEN='pypi-your-token-here'")
25
26
  return
26
27
 
@@ -75,4 +75,4 @@ def _supercharge_children():
75
75
  def manual_sweep():
76
76
  gc.enable()
77
77
  gc.collect(0)
78
- gc.disable()
78
+ gc.disable()
@@ -0,0 +1 @@
1
+ from .hython import init, boost, np, aiohttp, requests
@@ -0,0 +1,41 @@
1
+ from fasthardware import fasthardware
2
+ import numpy as np
3
+ import aiohttp
4
+ import requests
5
+ from functools import wraps
6
+
7
+ __all__ = ['np', 'aiohttp', 'requests', 'init', 'boost']
8
+
9
+ _initialized = False
10
+
11
+
12
+ def init(mode="DEFAULT"):
13
+ """
14
+ 프로그램 시작 시 딱 한 번 호출.
15
+ 전체 하드웨어 가속 환경을 초기화합니다.
16
+ mode: "DEFAULT" 또는 "ULTIMATE"
17
+ """
18
+ global _initialized
19
+ print("\n🚀 [HYTHON] Initializing Hyper-Performance Environment...")
20
+ fasthardware.speedup(mode=mode)
21
+ _initialized = True
22
+
23
+
24
+ def boost():
25
+ """
26
+ 함수에 붙이는 데코레이터.
27
+ 함수 실행 후 메모리를 자동으로 정리합니다.
28
+ init()은 별도로 한 번만 호출하세요.
29
+ """
30
+ def decorator(func):
31
+ @wraps(func)
32
+ def wrapper(*args, **kwargs):
33
+ if not _initialized:
34
+ print("[HYTHON] Warning: call init() first.")
35
+ try:
36
+ result = func(*args, **kwargs)
37
+ return result
38
+ finally:
39
+ fasthardware.manual_sweep()
40
+ return wrapper
41
+ return decorator
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hython
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: The ultimate high-performance utility framework for Python, powered by fasthardware.
5
5
  Author: Choi Woongyo
6
6
  Author-email: chldnsry1214@gmail.com
@@ -8,7 +8,7 @@ if os.path.exists("README.md"):
8
8
 
9
9
  setup(
10
10
  name="hython",
11
- version="1.0.2",
11
+ version="1.0.3",
12
12
  author="Choi Woongyo",
13
13
  author_email="chldnsry1214@gmail.com",
14
14
  description="The ultimate high-performance utility framework for Python, powered by fasthardware.",
@@ -1 +0,0 @@
1
- from .hython import init, boost, np, requests, aiohttp
@@ -1,26 +0,0 @@
1
- from fasthardware import fasthardware
2
- import numpy as np
3
- import aiohttp
4
- import requests
5
- from functools import wraps
6
-
7
- np=np
8
- aiohttp=aiohttp
9
- requests=requests
10
-
11
- def init(mode="DEFAULT"):
12
- print("\n🚀 [HYTHON] Initializing Hyper-Performance Environment...")
13
- fasthardware.speedup(mode=mode)
14
-
15
- def boost(mode="DEFAULT"):
16
- def decorator(func):
17
- @wraps(func)
18
- def wrapper(*args, **kwargs):
19
- fasthardware.speedup(mode=mode)
20
- try:
21
- result = func(*args, **kwargs)
22
- return result
23
- finally:
24
- fasthardware.manual_sweep()
25
- return wrapper
26
- return decorator
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes