IncludeCPP 3.4.1__tar.gz → 3.4.19__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.
Files changed (50) hide show
  1. {includecpp-3.4.1 → includecpp-3.4.19}/IncludeCPP.egg-info/PKG-INFO +12 -2
  2. {includecpp-3.4.1 → includecpp-3.4.19}/IncludeCPP.egg-info/SOURCES.txt +20 -0
  3. {includecpp-3.4.1 → includecpp-3.4.19}/PKG-INFO +12 -2
  4. {includecpp-3.4.1 → includecpp-3.4.19}/README.md +11 -1
  5. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/__init__.py +59 -58
  6. includecpp-3.4.19/includecpp/__init__.pyi +255 -0
  7. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/cli/commands.py +499 -0
  8. includecpp-3.4.19/includecpp/core/cssl/__init__.py +42 -0
  9. includecpp-3.4.19/includecpp/core/cssl/cssl_builtins.py +1931 -0
  10. includecpp-3.4.19/includecpp/core/cssl/cssl_events.py +621 -0
  11. includecpp-3.4.19/includecpp/core/cssl/cssl_modules.py +2803 -0
  12. includecpp-3.4.19/includecpp/core/cssl/cssl_parser.py +2226 -0
  13. includecpp-3.4.19/includecpp/core/cssl/cssl_runtime.py +2367 -0
  14. includecpp-3.4.19/includecpp/core/cssl/cssl_syntax.py +488 -0
  15. includecpp-3.4.19/includecpp/core/cssl/cssl_types.py +953 -0
  16. includecpp-3.4.19/includecpp/core/cssl_bridge.py +781 -0
  17. includecpp-3.4.19/includecpp/core/cssl_bridge.pyi +311 -0
  18. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/generator/parser.cpp +1 -1
  19. {includecpp-3.4.1 → includecpp-3.4.19}/pyproject.toml +63 -60
  20. {includecpp-3.4.1 → includecpp-3.4.19}/setup.py +1 -1
  21. includecpp-3.4.1/includecpp/__init__.pyi +0 -124
  22. {includecpp-3.4.1 → includecpp-3.4.19}/IncludeCPP.egg-info/dependency_links.txt +0 -0
  23. {includecpp-3.4.1 → includecpp-3.4.19}/IncludeCPP.egg-info/entry_points.txt +0 -0
  24. {includecpp-3.4.1 → includecpp-3.4.19}/IncludeCPP.egg-info/requires.txt +0 -0
  25. {includecpp-3.4.1 → includecpp-3.4.19}/IncludeCPP.egg-info/top_level.txt +0 -0
  26. {includecpp-3.4.1 → includecpp-3.4.19}/LICENSE +0 -0
  27. {includecpp-3.4.1 → includecpp-3.4.19}/MANIFEST.in +0 -0
  28. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/__main__.py +0 -0
  29. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/cli/__init__.py +0 -0
  30. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/cli/config_parser.py +0 -0
  31. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/__init__.py +0 -0
  32. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/ai_integration.py +0 -0
  33. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/build_manager.py +0 -0
  34. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/cpp_api.py +0 -0
  35. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/cpp_api.pyi +0 -0
  36. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/cppy_converter.py +0 -0
  37. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/error_catalog.py +0 -0
  38. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/error_formatter.py +0 -0
  39. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/exceptions.py +0 -0
  40. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/path_discovery.py +0 -0
  41. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/project_ui.py +0 -0
  42. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/core/settings_ui.py +0 -0
  43. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/generator/__init__.py +0 -0
  44. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/generator/parser.h +0 -0
  45. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/generator/type_resolver.cpp +0 -0
  46. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/generator/type_resolver.h +0 -0
  47. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/py.typed +0 -0
  48. {includecpp-3.4.1 → includecpp-3.4.19}/includecpp/templates/cpp.proj.template +0 -0
  49. {includecpp-3.4.1 → includecpp-3.4.19}/requirements.txt +0 -0
  50. {includecpp-3.4.1 → includecpp-3.4.19}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.4.1
3
+ Version: 3.4.19
4
4
  Summary: Professional C++ Python bindings with type-generic templates, pystubs and native threading
5
5
  Home-page: https://github.com/liliassg/IncludeCPP
6
6
  Author: Lilias Hatterscheidt
@@ -625,6 +625,16 @@ Use at your own discretion. Report issues at: https://github.com/hatte/IncludeCP
625
625
 
626
626
  # Changelog
627
627
 
628
+ ## v3.4.2
629
+ - **New Feature: `exec` Command**
630
+ - Interactive REPL for quick code testing without creating files
631
+ - `includecpp exec py` - Python REPL with IncludeCPP support
632
+ - `includecpp exec cpp` - C++ REPL with auto-compilation
633
+ - Auto-import modules: `includecpp exec py mymodule`
634
+ - Auto-import from plugins: `includecpp exec py plugins/math.cp`
635
+ - Import all modules: `includecpp exec py --all`
636
+ - Enter code line by line, press ENTER on empty line to execute
637
+
628
638
  ## v3.4.1
629
639
  - **Bug Fixes:**
630
640
  - fix command: Fixed false positives for unused variables (sum, memory_) using word-boundary matching
@@ -796,4 +806,4 @@ Use at your own discretion. Report issues at: https://github.com/hatte/IncludeCP
796
806
 
797
807
  ---
798
808
 
799
- MIT License | v3.4.1 | [GitHub](https://github.com/liliassg/IncludeCPP)
809
+ MIT License | v3.4.2 | [GitHub](https://github.com/liliassg/IncludeCPP)
@@ -17,12 +17,22 @@ setup.py
17
17
  ./includecpp/core/cpp_api.py
18
18
  ./includecpp/core/cpp_api.pyi
19
19
  ./includecpp/core/cppy_converter.py
20
+ ./includecpp/core/cssl_bridge.py
21
+ ./includecpp/core/cssl_bridge.pyi
20
22
  ./includecpp/core/error_catalog.py
21
23
  ./includecpp/core/error_formatter.py
22
24
  ./includecpp/core/exceptions.py
23
25
  ./includecpp/core/path_discovery.py
24
26
  ./includecpp/core/project_ui.py
25
27
  ./includecpp/core/settings_ui.py
28
+ ./includecpp/core/cssl/__init__.py
29
+ ./includecpp/core/cssl/cssl_builtins.py
30
+ ./includecpp/core/cssl/cssl_events.py
31
+ ./includecpp/core/cssl/cssl_modules.py
32
+ ./includecpp/core/cssl/cssl_parser.py
33
+ ./includecpp/core/cssl/cssl_runtime.py
34
+ ./includecpp/core/cssl/cssl_syntax.py
35
+ ./includecpp/core/cssl/cssl_types.py
26
36
  ./includecpp/generator/__init__.py
27
37
  ./includecpp/generator/parser.cpp
28
38
  ./includecpp/generator/parser.h
@@ -48,12 +58,22 @@ includecpp/core/build_manager.py
48
58
  includecpp/core/cpp_api.py
49
59
  includecpp/core/cpp_api.pyi
50
60
  includecpp/core/cppy_converter.py
61
+ includecpp/core/cssl_bridge.py
62
+ includecpp/core/cssl_bridge.pyi
51
63
  includecpp/core/error_catalog.py
52
64
  includecpp/core/error_formatter.py
53
65
  includecpp/core/exceptions.py
54
66
  includecpp/core/path_discovery.py
55
67
  includecpp/core/project_ui.py
56
68
  includecpp/core/settings_ui.py
69
+ includecpp/core/cssl/__init__.py
70
+ includecpp/core/cssl/cssl_builtins.py
71
+ includecpp/core/cssl/cssl_events.py
72
+ includecpp/core/cssl/cssl_modules.py
73
+ includecpp/core/cssl/cssl_parser.py
74
+ includecpp/core/cssl/cssl_runtime.py
75
+ includecpp/core/cssl/cssl_syntax.py
76
+ includecpp/core/cssl/cssl_types.py
57
77
  includecpp/generator/__init__.py
58
78
  includecpp/generator/parser.cpp
59
79
  includecpp/generator/parser.h
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.4.1
3
+ Version: 3.4.19
4
4
  Summary: Professional C++ Python bindings with type-generic templates, pystubs and native threading
5
5
  Home-page: https://github.com/liliassg/IncludeCPP
6
6
  Author: Lilias Hatterscheidt
@@ -625,6 +625,16 @@ Use at your own discretion. Report issues at: https://github.com/hatte/IncludeCP
625
625
 
626
626
  # Changelog
627
627
 
628
+ ## v3.4.2
629
+ - **New Feature: `exec` Command**
630
+ - Interactive REPL for quick code testing without creating files
631
+ - `includecpp exec py` - Python REPL with IncludeCPP support
632
+ - `includecpp exec cpp` - C++ REPL with auto-compilation
633
+ - Auto-import modules: `includecpp exec py mymodule`
634
+ - Auto-import from plugins: `includecpp exec py plugins/math.cp`
635
+ - Import all modules: `includecpp exec py --all`
636
+ - Enter code line by line, press ENTER on empty line to execute
637
+
628
638
  ## v3.4.1
629
639
  - **Bug Fixes:**
630
640
  - fix command: Fixed false positives for unused variables (sum, memory_) using word-boundary matching
@@ -796,4 +806,4 @@ Use at your own discretion. Report issues at: https://github.com/hatte/IncludeCP
796
806
 
797
807
  ---
798
808
 
799
- MIT License | v3.4.1 | [GitHub](https://github.com/liliassg/IncludeCPP)
809
+ MIT License | v3.4.2 | [GitHub](https://github.com/liliassg/IncludeCPP)
@@ -591,6 +591,16 @@ Use at your own discretion. Report issues at: https://github.com/hatte/IncludeCP
591
591
 
592
592
  # Changelog
593
593
 
594
+ ## v3.4.2
595
+ - **New Feature: `exec` Command**
596
+ - Interactive REPL for quick code testing without creating files
597
+ - `includecpp exec py` - Python REPL with IncludeCPP support
598
+ - `includecpp exec cpp` - C++ REPL with auto-compilation
599
+ - Auto-import modules: `includecpp exec py mymodule`
600
+ - Auto-import from plugins: `includecpp exec py plugins/math.cp`
601
+ - Import all modules: `includecpp exec py --all`
602
+ - Enter code line by line, press ENTER on empty line to execute
603
+
594
604
  ## v3.4.1
595
605
  - **Bug Fixes:**
596
606
  - fix command: Fixed false positives for unused variables (sum, memory_) using word-boundary matching
@@ -762,4 +772,4 @@ Use at your own discretion. Report issues at: https://github.com/hatte/IncludeCP
762
772
 
763
773
  ---
764
774
 
765
- MIT License | v3.4.1 | [GitHub](https://github.com/liliassg/IncludeCPP)
775
+ MIT License | v3.4.2 | [GitHub](https://github.com/liliassg/IncludeCPP)
@@ -1,58 +1,59 @@
1
- from .core.cpp_api import CppApi
2
- import warnings
3
-
4
- __version__ = "3.4.1"
5
- __all__ = ["CppApi"]
6
-
7
- # Module-level cache for C++ modules
8
- _api_instance = None
9
- _loaded_modules = {}
10
-
11
- def _get_api():
12
- """Get or create singleton CppApi instance."""
13
- global _api_instance
14
- if _api_instance is None:
15
- _api_instance = CppApi()
16
- return _api_instance
17
-
18
- def __getattr__(name: str):
19
- """Enable: from includecpp import fast_list
20
-
21
- This hook is called when Python cannot find an attribute in this module.
22
- It allows dynamic C++ module loading via the import system.
23
- """
24
- if name.startswith('_'):
25
- raise AttributeError(f"module 'includecpp' has no attribute '{name}'")
26
-
27
- if name in _loaded_modules:
28
- return _loaded_modules[name]
29
-
30
- api = _get_api()
31
-
32
- if name not in api.registry:
33
- available = list(api.registry.keys())
34
- raise AttributeError(
35
- f"Module '{name}' not found. "
36
- f"Available: {available}. "
37
- f"Run 'includecpp rebuild' first."
38
- )
39
-
40
- if api.need_update(name):
41
- warnings.warn(
42
- f"Module '{name}' source files changed. "
43
- f"Run 'includecpp rebuild' to update.",
44
- UserWarning
45
- )
46
-
47
- module = api.include(name)
48
- _loaded_modules[name] = module
49
- return module
50
-
51
- def __dir__():
52
- """List available attributes including C++ modules."""
53
- base = ['CppApi', '__version__']
54
- try:
55
- api = _get_api()
56
- return sorted(set(base + list(api.registry.keys())))
57
- except Exception:
58
- return base
1
+ from .core.cpp_api import CppApi
2
+ from .core import cssl_bridge as CSSL
3
+ import warnings
4
+
5
+ __version__ = "3.4.19"
6
+ __all__ = ["CppApi", "CSSL"]
7
+
8
+ # Module-level cache for C++ modules
9
+ _api_instance = None
10
+ _loaded_modules = {}
11
+
12
+ def _get_api():
13
+ """Get or create singleton CppApi instance."""
14
+ global _api_instance
15
+ if _api_instance is None:
16
+ _api_instance = CppApi()
17
+ return _api_instance
18
+
19
+ def __getattr__(name: str):
20
+ """Enable: from includecpp import fast_list
21
+
22
+ This hook is called when Python cannot find an attribute in this module.
23
+ It allows dynamic C++ module loading via the import system.
24
+ """
25
+ if name.startswith('_'):
26
+ raise AttributeError(f"module 'includecpp' has no attribute '{name}'")
27
+
28
+ if name in _loaded_modules:
29
+ return _loaded_modules[name]
30
+
31
+ api = _get_api()
32
+
33
+ if name not in api.registry:
34
+ available = list(api.registry.keys())
35
+ raise AttributeError(
36
+ f"Module '{name}' not found. "
37
+ f"Available: {available}. "
38
+ f"Run 'includecpp rebuild' first."
39
+ )
40
+
41
+ if api.need_update(name):
42
+ warnings.warn(
43
+ f"Module '{name}' source files changed. "
44
+ f"Run 'includecpp rebuild' to update.",
45
+ UserWarning
46
+ )
47
+
48
+ module = api.include(name)
49
+ _loaded_modules[name] = module
50
+ return module
51
+
52
+ def __dir__():
53
+ """List available attributes including C++ modules."""
54
+ base = ['CppApi', 'CSSL', '__version__']
55
+ try:
56
+ api = _get_api()
57
+ return sorted(set(base + list(api.registry.keys())))
58
+ except Exception:
59
+ return base
@@ -0,0 +1,255 @@
1
+ """Type stubs for includecpp package - VSCode IntelliSense support."""
2
+
3
+ from typing import Any, Dict, Optional, List, Literal, overload, Callable
4
+ from pathlib import Path
5
+ from types import ModuleType
6
+ import threading
7
+
8
+ # Import generated module wrappers for VSCode autocomplete
9
+ # These are created by 'includecpp rebuild' and provide module-specific type hints
10
+ try:
11
+ from .core.cpp_api_extensions import *
12
+ except ImportError:
13
+ pass # Generated during rebuild
14
+
15
+
16
+ # ========== CSSL Module - CSO Service Script Language ==========
17
+ class _CSSLModule:
18
+ """CSSL callable module created via CSSL.module()"""
19
+ def __call__(self, *args: Any) -> Any:
20
+ """Execute the module code with arguments."""
21
+ ...
22
+
23
+ class _CSSLFunctionModule:
24
+ """CSSL function module created via CSSL.makemodule()"""
25
+ def __getattr__(self, name: str) -> Callable[..., Any]:
26
+ """Get a function from the module."""
27
+ ...
28
+
29
+ class _CsslLang:
30
+ """CSSL Language interface."""
31
+
32
+ def exec(self, path_or_code: str, *args: Any) -> Any:
33
+ """Execute CSSL code or file.
34
+
35
+ Args:
36
+ path_or_code: Path to .cssl file or CSSL code string
37
+ *args: Arguments accessible via parameter.get(index)
38
+
39
+ Returns:
40
+ Execution result
41
+ """
42
+ ...
43
+
44
+ def T_exec(
45
+ self,
46
+ path_or_code: str,
47
+ *args: Any,
48
+ callback: Optional[Callable[[Any], None]] = None
49
+ ) -> threading.Thread:
50
+ """Execute CSSL code asynchronously in a thread."""
51
+ ...
52
+
53
+ def wait_all(self, timeout: Optional[float] = None) -> None:
54
+ """Wait for all async executions to complete."""
55
+ ...
56
+
57
+ def get_output(self) -> List[str]:
58
+ """Get output buffer from last execution."""
59
+ ...
60
+
61
+ def clear_output(self) -> None:
62
+ """Clear output buffer."""
63
+ ...
64
+
65
+ def set_global(self, name: str, value: Any) -> None:
66
+ """Set a global variable in CSSL runtime."""
67
+ ...
68
+
69
+ def get_global(self, name: str) -> Any:
70
+ """Get a global variable from CSSL runtime."""
71
+ ...
72
+
73
+ def module(self, code: str) -> _CSSLModule:
74
+ """Create a callable CSSL module from code."""
75
+ ...
76
+
77
+ def makemodule(self, code: str) -> _CSSLFunctionModule:
78
+ """Create a CSSL module with accessible functions."""
79
+ ...
80
+
81
+
82
+ class _CSSLBridge:
83
+ """CSSL Bridge module - access to CSSL language from Python."""
84
+
85
+ CsslLang: type[_CsslLang]
86
+
87
+ def exec(self, path_or_code: str, *args: Any) -> Any:
88
+ """Execute CSSL code or file."""
89
+ ...
90
+
91
+ def _exec(self, code: str, *args: Any) -> Any:
92
+ """Execute CSSL code (alias for exec)."""
93
+ ...
94
+
95
+ def T_exec(
96
+ self,
97
+ path_or_code: str,
98
+ *args: Any,
99
+ callback: Optional[Callable[[Any], None]] = None
100
+ ) -> threading.Thread:
101
+ """Execute CSSL code asynchronously."""
102
+ ...
103
+
104
+ def _T_exec(
105
+ self,
106
+ code: str,
107
+ *args: Any,
108
+ callback: Optional[Callable[[Any], None]] = None
109
+ ) -> threading.Thread:
110
+ """Execute CSSL code asynchronously (alias)."""
111
+ ...
112
+
113
+ def set_global(self, name: str, value: Any) -> None:
114
+ """Set a global variable."""
115
+ ...
116
+
117
+ def get_global(self, name: str) -> Any:
118
+ """Get a global variable."""
119
+ ...
120
+
121
+ def get_output(self) -> List[str]:
122
+ """Get output buffer."""
123
+ ...
124
+
125
+ def clear_output(self) -> None:
126
+ """Clear output buffer."""
127
+ ...
128
+
129
+ def module(self, code: str) -> _CSSLModule:
130
+ """Create a callable CSSL module."""
131
+ ...
132
+
133
+ def makemodule(self, code: str) -> _CSSLFunctionModule:
134
+ """Create a CSSL function module."""
135
+ ...
136
+
137
+ def get_cssl(self) -> _CsslLang:
138
+ """Get default CSSL instance."""
139
+ ...
140
+
141
+
142
+ # CSSL module instance - CSO Service Script Language
143
+ CSSL: _CSSLBridge
144
+
145
+ __version__: str
146
+
147
+ # Dynamic module access via: from includecpp import <module_name>
148
+ # Auto-generated module declarations
149
+ # These allow: from includecpp import <module_name>
150
+ # (Run 'includecpp rebuild' to generate declarations for your modules)
151
+
152
+ def __dir__() -> List[str]:
153
+ """List available modules including dynamically loaded C++ modules."""
154
+ ...
155
+
156
+ class ModuleWrapper:
157
+ """Wrapper for C++ modules with getInfo() and dynamic attributes."""
158
+
159
+ def getInfo(self) -> Dict[str, Any]:
160
+ """Get module metadata including classes, functions, and structs."""
161
+ ...
162
+
163
+ def __getattr__(self, name: str) -> Any: ...
164
+ def __dir__(self) -> List[str]: ...
165
+
166
+ class CppApi:
167
+ """Main API class for including C++ modules with type hints."""
168
+
169
+ # Inbuilt module constants
170
+ FileSystem: str
171
+ Crypto: str
172
+ JSON: str
173
+ StringUtils: str
174
+ Networking: str
175
+ DataStructures: str
176
+ Threading: str
177
+ StandardMenus: str
178
+
179
+ def __init__(
180
+ self,
181
+ verbose: bool = False,
182
+ auto_update: bool = False,
183
+ config_path: Optional[Path] = None
184
+ ) -> None: ...
185
+
186
+ @property
187
+ def Inbuilds(self) -> List[str]:
188
+ """List of available inbuilt modules."""
189
+ ...
190
+
191
+ def exists(self, module_name: str) -> bool:
192
+ """Check if a module exists."""
193
+ ...
194
+
195
+ # The include() method returns ModuleWrapper with dynamic attributes
196
+ # VSCode will show getInfo() and other attributes set at runtime
197
+ def include(
198
+ self,
199
+ module_name: str,
200
+ auto_update: Optional[bool] = None
201
+ ) -> ModuleWrapper:
202
+ """Include a C++ module.
203
+
204
+ Returns a ModuleWrapper instance with:
205
+ - getInfo() method for module metadata
206
+ - Dynamic attributes for classes, functions, and structs
207
+
208
+ Example:
209
+ crypto = api.include("crypto")
210
+ crypto.getInfo() # Get module info
211
+ crypto.Crypto() # Access Crypto class
212
+ crypto.md5(...) # Call md5 function
213
+
214
+ Args:
215
+ module_name: Name of the module to include
216
+ auto_update: Whether to auto-rebuild if outdated (default: False)
217
+
218
+ Returns:
219
+ ModuleWrapper with module-specific attributes
220
+ """
221
+ ...
222
+
223
+ def need_update(self, module_name: str) -> bool:
224
+ """Check if module needs rebuild based on source file changes.
225
+
226
+ Args:
227
+ module_name: Name of module to check
228
+
229
+ Returns:
230
+ True if source files are newer than build
231
+ """
232
+ ...
233
+
234
+ def update(self, module_name: str, verbose: Optional[bool] = None) -> None:
235
+ """Rebuild a single module.
236
+
237
+ Args:
238
+ module_name: Name of module to rebuild
239
+ verbose: Enable verbose output (default: use instance setting)
240
+ """
241
+ ...
242
+
243
+ def rebuild(
244
+ self,
245
+ verbose: bool = False,
246
+ clean: bool = False
247
+ ) -> None:
248
+ """Rebuild C++ modules."""
249
+ ...
250
+
251
+ def list_modules(self) -> List[str]:
252
+ """List all available modules."""
253
+ ...
254
+
255
+ __all__: List[str] # Includes: CppApi, CSSL, __version__