IncludeCPP 3.5.0__py3-none-any.whl → 3.6.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.
@@ -149,6 +149,111 @@ class CsslLang:
149
149
  """
150
150
  ...
151
151
 
152
+ def share(self, instance: Any, name: str = ...) -> str:
153
+ """
154
+ Share a Python object with CSSL (LIVE sharing).
155
+
156
+ Changes in CSSL reflect back to Python immediately.
157
+
158
+ Args can be passed in either order:
159
+ cssl.share(my_object, "name") # Preferred
160
+ cssl.share("name", my_object) # Also works
161
+
162
+ Usage:
163
+ class Counter:
164
+ def __init__(self):
165
+ self.value = 0
166
+
167
+ counter = Counter()
168
+ cssl.share(counter, "cnt")
169
+ cssl.exec('''
170
+ $cnt.value = $cnt.value + 1;
171
+ ''')
172
+ print(counter.value) # 1
173
+
174
+ Args:
175
+ instance: Python object to share
176
+ name: Name to reference in CSSL as $name
177
+
178
+ Returns:
179
+ Path to the shared object marker file
180
+ """
181
+ ...
182
+
183
+ def unshare(self, name: str) -> bool:
184
+ """
185
+ Remove a shared object.
186
+
187
+ Args:
188
+ name: Name of the shared object to remove
189
+
190
+ Returns:
191
+ True if removed, False if not found
192
+ """
193
+ ...
194
+
195
+ def code(self, name: str, code: str) -> None:
196
+ """
197
+ Register inline CSSL code as a named payload.
198
+
199
+ Usage:
200
+ cssl.code("helpers", '''
201
+ void log(string msg) {
202
+ printl("[LOG] " + msg);
203
+ }
204
+ ''')
205
+ cssl.exec('''
206
+ payload("helpers");
207
+ @log("Hello");
208
+ ''')
209
+
210
+ Args:
211
+ name: Name for the payload
212
+ code: CSSL code string
213
+ """
214
+ ...
215
+
216
+ def get_shared(self, name: str) -> Optional[Any]:
217
+ """
218
+ Get a shared object by name (for Python-side access).
219
+
220
+ Returns the actual live object reference, not a copy.
221
+
222
+ Args:
223
+ name: Name of the shared object
224
+
225
+ Returns:
226
+ The live shared object or None if not found
227
+ """
228
+ ...
229
+
230
+ def shared(self, name: str) -> Optional[Any]:
231
+ """
232
+ Get a shared object by name (alias for get_shared).
233
+
234
+ Returns the actual live object reference, not a copy.
235
+ Works with both Python cssl.share() and CSSL ==> $name shared objects.
236
+
237
+ Usage:
238
+ from includecpp import CSSL
239
+ cssl = CSSL.CsslLang()
240
+
241
+ # Share an object
242
+ my_obj = {"value": 42}
243
+ cssl.share(my_obj, "data")
244
+
245
+ # Retrieve it later
246
+ obj = cssl.shared("data")
247
+ print(obj["value"]) # 42
248
+
249
+ Args:
250
+ name: Name of the shared object (without $ prefix)
251
+
252
+ Returns:
253
+ The live shared object or None if not found
254
+ """
255
+ ...
256
+
152
257
 
153
258
  def get_cssl() -> CsslLang:
154
259
  """Get default CSSL instance."""
@@ -308,4 +413,76 @@ def makemodule(code: str) -> CSSLFunctionModule:
308
413
  ...
309
414
 
310
415
 
416
+ def share(instance: Any, name: str = ...) -> str:
417
+ """
418
+ Share a Python object globally for all CSSL instances (LIVE sharing).
419
+
420
+ Changes made through CSSL will reflect back to the original object.
421
+
422
+ Args can be passed in either order:
423
+ share(my_object, "name") # Preferred
424
+ share("name", my_object) # Also works
425
+
426
+ Args:
427
+ instance: Python object to share
428
+ name: Name to reference in CSSL as $name
429
+
430
+ Returns:
431
+ Path to the shared object marker file
432
+ """
433
+ ...
434
+
435
+
436
+ def unshare(name: str) -> bool:
437
+ """
438
+ Remove a globally shared object.
439
+
440
+ Args:
441
+ name: Name of the shared object to remove
442
+
443
+ Returns:
444
+ True if removed, False if not found
445
+ """
446
+ ...
447
+
448
+
449
+ def get_shared(name: str) -> Optional[Any]:
450
+ """
451
+ Get a globally shared object by name.
452
+
453
+ Args:
454
+ name: Name of the shared object
455
+
456
+ Returns:
457
+ The live shared object or None if not found
458
+ """
459
+ ...
460
+
461
+
462
+ def shared(name: str) -> Optional[Any]:
463
+ """
464
+ Get a shared object by name (alias for get_shared).
465
+
466
+ Works with both Python share() and CSSL ==> $name shared objects.
467
+
468
+ Usage:
469
+ from includecpp import CSSL
470
+
471
+ # Share an object
472
+ my_obj = {"value": 42}
473
+ CSSL.share(my_obj, "data")
474
+
475
+ # Retrieve it later
476
+ obj = CSSL.shared("data")
477
+ print(obj["value"]) # 42
478
+
479
+ Args:
480
+ name: Name of the shared object (without $ prefix)
481
+
482
+ Returns:
483
+ The live shared object or None if not found
484
+ """
485
+ ...
486
+
487
+
311
488
  __all__: List[str]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.5.0
3
+ Version: 3.6.0
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
@@ -1,4 +1,4 @@
1
- includecpp/__init__.py,sha256=Lg4ApbFSBpQVYm5SgU_irWBxdxpWkOJOmWYy9xG_wiQ,1672
1
+ includecpp/__init__.py,sha256=1pUwTIyhcdJlS4hNJ6GlsB5dzeOuVEZnlrV6NiI9rqE,1672
2
2
  includecpp/__init__.pyi,sha256=c4gZW7_XQXcp6FBcTi5W7zXTmCtbgQhlC4cyeVqtRRM,7253
3
3
  includecpp/__main__.py,sha256=d6QK0PkvUe1ENofpmHRAg3bwNbZr8PiRscfI3-WRfVg,72
4
4
  includecpp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -11,23 +11,23 @@ includecpp/core/build_manager.py,sha256=uLuYsuiC6OsOGaU5wAJfl4M3IbdnIDgogfMd8VsV
11
11
  includecpp/core/cpp_api.py,sha256=8y_B1L18rhSBZln654xPPzqO2PdvAlLpJrfEjzl7Wnc,14039
12
12
  includecpp/core/cpp_api.pyi,sha256=IEiaKqaPItnn6rjL7aK32D3o9FYmRYCgCZbqiQNUwdc,3496
13
13
  includecpp/core/cppy_converter.py,sha256=b7yqu-aoa0wShNY0GvQT67TnNhYya4GyYmG7oDdqDV4,156686
14
- includecpp/core/cssl_bridge.py,sha256=ZrFXkJmu0ikZu0CeNuxjKyaarzpb1O6Ph3ynf8ZomTE,24396
15
- includecpp/core/cssl_bridge.pyi,sha256=Q4zjc2Kf2wPJPnfgHS-koPEon3Kty6o3mCvp9E5Q8tE,7635
14
+ includecpp/core/cssl_bridge.py,sha256=xF2AinLlhxwcG9ZM2F0AjLc1dnJOSnRBja2-wEm0vog,27474
15
+ includecpp/core/cssl_bridge.pyi,sha256=tQxb3lneufgVmXSAqDUwjoluUNo8Wa5QIOnaL8ai6q0,12055
16
16
  includecpp/core/error_catalog.py,sha256=VS3N-P0yEbiHimsDPtcaYfrUb7mXQ-7pqw18PtSngaU,33869
17
17
  includecpp/core/error_formatter.py,sha256=7-MzRIT8cM4uODxy0IZ9pu7pqR4Pq2I8Si0QQZHjmVc,39239
18
18
  includecpp/core/exceptions.py,sha256=szeF4qdzi_q8hBBZi7mJxkliyQ0crplkLYe0ymlBGtk,2459
19
19
  includecpp/core/path_discovery.py,sha256=jI0oSq6Hsd4LKXmU4dOiGSrXcEO_KWMXfQ5_ylBmXvU,2561
20
20
  includecpp/core/project_ui.py,sha256=la2EQZKmUkJGuJxnbs09hH1ZhBh9bfndo6okzZsk2dQ,141134
21
21
  includecpp/core/settings_ui.py,sha256=B2SlwgdplF2KiBk5UYf2l8Jjifjd0F-FmBP0DPsVCEQ,11798
22
- includecpp/core/cssl/CSSL_DOCUMENTATION.md,sha256=ibtovYOCM4pJqOOGPGJyWL40N3D0Vm5RgQzzh4mJGr8,26198
22
+ includecpp/core/cssl/CSSL_DOCUMENTATION.md,sha256=1fyL6ZmWi3e6YiXlJxcF0yn7XifL9_IG2101xfNgMgg,34484
23
23
  includecpp/core/cssl/__init__.py,sha256=TYRlyheTw5OYkkmUxJYpAjyyQShu6NF4igYZYE76eR0,1811
24
- includecpp/core/cssl/cssl_builtins.py,sha256=WJtSWPsNNOSYtXBHK0h4ImXLrqId8ElfykQ2pBbhD3c,71368
24
+ includecpp/core/cssl/cssl_builtins.py,sha256=nUU-lwHhOJfQNV_OLLFFJNllJsUyw-vq55PAoubyWJI,80420
25
25
  includecpp/core/cssl/cssl_events.py,sha256=nupIcXW_Vjdud7zCU6hdwkQRQ0MujlPM7Tk2u7eDAiY,21013
26
26
  includecpp/core/cssl/cssl_modules.py,sha256=cUg0-zdymMnWWTsA_BUrW5dx4R04dHpKcUhm-Wfiwwo,103006
27
- includecpp/core/cssl/cssl_parser.py,sha256=TxkqYHSGoY8ddHupD7qfaBgwKTCofhpmApzN-rWFCnY,91644
28
- includecpp/core/cssl/cssl_runtime.py,sha256=g_R5BPWlqYgkk8wIEjawKr-_W7S_wdXAtkzrgJ-7yxs,97317
27
+ includecpp/core/cssl/cssl_parser.py,sha256=0Yd9zHDbVLzRAAChppkPy6j9iqwLd9qJcznyTqU3DtE,100400
28
+ includecpp/core/cssl/cssl_runtime.py,sha256=c9r1Xrr5sHtCFSpjUw1u_IvttD4ghOQ3eR1e2lv2cNo,114067
29
29
  includecpp/core/cssl/cssl_syntax.py,sha256=vgI-dgj6gs9cOHwNRff6JbwZZYW_fYutnwCkznlgZiE,17006
30
- includecpp/core/cssl/cssl_types.py,sha256=JaBhVFcByaC-Thdkd0J9IMkUzLkxriBWx1XfwPr6knM,30561
30
+ includecpp/core/cssl/cssl_types.py,sha256=j-qiMKYMSXLLxx19pgHHbXuPYgiPL2QcwvCmG6pc1vw,40629
31
31
  includecpp/generator/__init__.py,sha256=Rsy41bwimaEloD3gDRR_znPfIJzIsCFuWZgCTJBLJlc,62
32
32
  includecpp/generator/parser.cpp,sha256=hbhHdtFH65rzp6prnARN9pNFF_ssr0NseVVcxq0fJh4,76833
33
33
  includecpp/generator/parser.h,sha256=EDm0b-pEesIIIQQ2PvH5h2qwlqJU9BH8SiMV7MWbsTo,11073
@@ -39,9 +39,9 @@ includecpp/vscode/cssl/__init__.py,sha256=rQJAx5X05v-mAwqX1Qb-rbZO219iR73MziFNRU
39
39
  includecpp/vscode/cssl/language-configuration.json,sha256=vBZSVBpV0UFlTO4d0aQrhTpR4lHje0Tb2n889k9W_Uc,986
40
40
  includecpp/vscode/cssl/package.json,sha256=t_xEMMew3ohtxv9riyPdGo_T6TMJi-REJ-GDS_GYbCk,872
41
41
  includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json,sha256=lvg2EHN8If1Hw0RY_EqatLupclQmhq3oZlnBA0Zi-54,8023
42
- includecpp-3.5.0.dist-info/licenses/LICENSE,sha256=fWCsGGsiWZir0UzDd20Hh-3wtRyk1zqUntvtVuAWhvc,1093
43
- includecpp-3.5.0.dist-info/METADATA,sha256=5rCFLg7vB9EsiDxQdmIJaaTHm2T1rwOP_hZn2hNwyfI,32122
44
- includecpp-3.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
- includecpp-3.5.0.dist-info/entry_points.txt,sha256=6A5Mif9gi0139Bf03W5plAb3wnAgbNaEVe1HJoGE-2o,59
46
- includecpp-3.5.0.dist-info/top_level.txt,sha256=RFUaR1KG-M6mCYwP6w4ydP5Cgc8yNbP78jxGAvyjMa8,11
47
- includecpp-3.5.0.dist-info/RECORD,,
42
+ includecpp-3.6.0.dist-info/licenses/LICENSE,sha256=fWCsGGsiWZir0UzDd20Hh-3wtRyk1zqUntvtVuAWhvc,1093
43
+ includecpp-3.6.0.dist-info/METADATA,sha256=CbUV6R8D4J3MsNdSHbyBVUwuJuNRv9orybf1BqxoGZg,32122
44
+ includecpp-3.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
+ includecpp-3.6.0.dist-info/entry_points.txt,sha256=6A5Mif9gi0139Bf03W5plAb3wnAgbNaEVe1HJoGE-2o,59
46
+ includecpp-3.6.0.dist-info/top_level.txt,sha256=RFUaR1KG-M6mCYwP6w4ydP5Cgc8yNbP78jxGAvyjMa8,11
47
+ includecpp-3.6.0.dist-info/RECORD,,