iris-pex-embedded-python 2.3.4__tar.gz → 2.3.8__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.

Potentially problematic release.


This version of iris-pex-embedded-python might be problematic. Click here for more details.

Files changed (50) hide show
  1. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/PKG-INFO +1 -1
  2. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/setup.py +3 -3
  3. iris_pex_embedded_python-2.3.8/src/grongier/__init__.py +0 -0
  4. iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier/PEX/WSGI.cls +99 -0
  5. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_utils.py +13 -4
  6. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/iris_pex_embedded_python.egg-info/PKG-INFO +1 -1
  7. iris_pex_embedded_python-2.3.8/src/iris_pex_embedded_python.egg-info/SOURCES.txt +47 -0
  8. iris_pex_embedded_python-2.3.4/src/iris_pex_embedded_python.egg-info/SOURCES.txt +0 -45
  9. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/LICENSE +0 -0
  10. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/README.md +0 -0
  11. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/pyproject.toml +0 -0
  12. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/setup.cfg +0 -0
  13. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/BusinessOperation.cls +0 -0
  14. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/BusinessProcess.cls +0 -0
  15. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/BusinessService.cls +0 -0
  16. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Common.cls +0 -0
  17. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Director.cls +0 -0
  18. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Duplex/Operation.cls +0 -0
  19. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Duplex/Process.cls +0 -0
  20. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Duplex/Service.cls +0 -0
  21. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/InboundAdapter.cls +0 -0
  22. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Message.cls +0 -0
  23. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/OutboundAdapter.cls +0 -0
  24. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/PickleMessage.cls +0 -0
  25. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/PrivateSession/Duplex.cls +0 -0
  26. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/PrivateSession/Message/Ack.cls +0 -0
  27. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/PrivateSession/Message/Poll.cls +0 -0
  28. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/PrivateSession/Message/Start.cls +0 -0
  29. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/PrivateSession/Message/Stop.cls +0 -0
  30. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Test.cls +0 -0
  31. {iris_pex_embedded_python-2.3.4/src/grongier/pex/data → iris_pex_embedded_python-2.3.8/src/grongier/cls/Grongier}/PEX/Utils.cls +0 -0
  32. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/__init__.py +0 -0
  33. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/__main__.py +0 -0
  34. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_business_host.py +0 -0
  35. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_business_operation.py +0 -0
  36. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_business_process.py +0 -0
  37. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_business_service.py +0 -0
  38. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_cli.py +0 -0
  39. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_common.py +0 -0
  40. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_director.py +0 -0
  41. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_inbound_adapter.py +0 -0
  42. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_message.py +0 -0
  43. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_outbound_adapter.py +0 -0
  44. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_pickle_message.py +0 -0
  45. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_private_session_duplex.py +0 -0
  46. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/grongier/pex/_private_session_process.py +0 -0
  47. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
  48. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
  49. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
  50. {iris_pex_embedded_python-2.3.4 → iris_pex_embedded_python-2.3.8}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iris_pex_embedded_python
3
- Version: 2.3.4
3
+ Version: 2.3.8
4
4
  Summary: iris_pex_embedded_python
5
5
  Home-page: https://github.com/grongierisc/interoperability-embedded-python
6
6
  Author: grongier
@@ -26,7 +26,7 @@ def main():
26
26
  description='iris_pex_embedded_python',
27
27
  long_description=long_description,
28
28
  long_description_content_type='text/markdown',
29
- version='2.3.4',
29
+ version='2.3.8',
30
30
  author='grongier',
31
31
  author_email='guillaume.rongier@intersystems.com',
32
32
  keywords='iris_pex_embedded_python',
@@ -46,8 +46,8 @@ def main():
46
46
  'Topic :: Utilities'
47
47
  ],
48
48
  package_dir={'': 'src'},
49
- packages=['grongier.pex','grongier.pex.data'],
50
- package_data={'grongier.pex.data': ['**/*.cls']},
49
+ packages=['grongier','grongier.pex','grongier.cls'],
50
+ package_data={'grongier.cls': ['**/*.cls']},
51
51
  python_requires='>=3.6',
52
52
  install_requires=[
53
53
  "dacite>=1.6.0",
@@ -0,0 +1,99 @@
1
+ Class Grongier.PEX.WSGI Extends (%RegisteredObject, %CSP.REST) [ ServerOnly = 1 ]
2
+ {
3
+
4
+ Parameter CLASSPATHS;
5
+
6
+ Parameter MODULENAME;
7
+
8
+ Parameter APPNAME;
9
+
10
+ /// Instance of class
11
+ Property app As %SYS.Python;
12
+
13
+ /// Helper method to write data to the output stream
14
+ ClassMethod write(data)
15
+ {
16
+ w data
17
+ }
18
+
19
+ /// Helper to build the environ
20
+ ClassMethod GetEnviron() As %SYS.Python
21
+ {
22
+ //set builtins
23
+ set builtins = ##class(%SYS.Python).Import("builtins")
24
+
25
+ //import dict to create environ
26
+ set dict = builtins.dict()
27
+
28
+ #dim %request As %CSP.Request
29
+
30
+ //set environ
31
+ do dict."__setitem__"("SERVER_NAME", $System.INetInfo.LocalHostName())
32
+ do dict."__setitem__"("SERVER_PORT", "")
33
+ do dict."__setitem__"("SERVER_PROTOCOL", "HTTP/1.1")
34
+ do dict."__setitem__"("SERVER_SOFTWARE", "IRIS")
35
+ do dict."__setitem__"("SCRIPT_NAME", ..#APPNAME)
36
+ do dict."__setitem__"("REQUEST_METHOD", %request.Method)
37
+ do dict."__setitem__"("CONTENT_TYPE", %request.ContentType)
38
+ do dict."__setitem__"("CHARSET", %request.CharSet)
39
+ Set app=$$getapp^%SYS.cspServer(%request.URL,.path,.match,.updatedurl)
40
+ do dict."__setitem__"("PATH_INFO", $extract(updatedurl,$length(path),*))
41
+
42
+ // to extract the query string
43
+
44
+ return dict
45
+ }
46
+
47
+ ClassMethod Page(skipheader As %Boolean = 1) As %Status [ Internal, ServerOnly = 1 ]
48
+ {
49
+ Try {
50
+ //set classpass
51
+ if ..#CLASSPATHS '="" {
52
+ set sys = ##class(%SYS.Python).Import("sys")
53
+ set delimiter = $s($system.Version.GetOS()="Windows":";",1:":")
54
+ set extraClasspaths = $tr(..#CLASSPATHS,delimiter,"|")
55
+ for i=1:1:$l(extraClasspaths,"|") {
56
+ set onePath = $p(extraClasspaths,"|",i)
57
+ set onePath = ##class(%File).NormalizeDirectory(onePath)
58
+ if onePath?1"$$IRISHOME"1P.E set onePath = $e($system.Util.InstallDirectory(),1,*-1)_$e(onePath,11,*)
59
+ if onePath'="" do sys.path.append(onePath)
60
+ }
61
+ }
62
+
63
+ //set environ
64
+ set environ = ..GetEnviron()
65
+
66
+ //import sys
67
+ set sys = ##class(%SYS.Python).Import("sys")
68
+
69
+ //set stdin
70
+ set builtins = ##class(%SYS.Python).Import("builtins")
71
+ set ba = builtins.bytearray()
72
+
73
+ while %request.Content.AtEnd = 0 {
74
+ do ba.extend(##class(%SYS.Python).Bytes(%request.Content.Read()))
75
+ }
76
+ //set handler
77
+ set handler = ##class(%SYS.Python).Import("grongier.pex.wsgi.handlers").IrisHandler(ba, sys.stdout, sys.stderr,environ)
78
+
79
+ //set module
80
+ set module = ##class(%SYS.Python).Import(..#MODULENAME)
81
+
82
+ //set builtins
83
+ set builtins = ##class(%SYS.Python).Import("builtins")
84
+
85
+ //set app
86
+ set application = builtins.getattr(module, ..#APPNAME)
87
+
88
+ //run app
89
+ do handler.run(application)
90
+
91
+ }
92
+ Catch ex {
93
+ return ex.AsStatus()
94
+ }
95
+
96
+ quit $$$OK
97
+ }
98
+
99
+ }
@@ -21,7 +21,7 @@ class _Utils():
21
21
 
22
22
  if path is None:
23
23
  # get the path of the data folder with pkg_resources
24
- path = pkg_resources.resource_filename(__name__, 'data')
24
+ path = pkg_resources.resource_filename('grongier', 'cls')
25
25
 
26
26
  _Utils.raise_on_error(iris.cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
27
27
 
@@ -190,13 +190,22 @@ class _Utils():
190
190
  raise ValueError("The filename must be absolute")
191
191
  # add the path to the system path
192
192
  sys.path.append(path)
193
- from settings import CLASSES, PRODUCTIONS
193
+ import settings
194
194
  except ImportError:
195
195
  # return an error if the settings file is not found
196
196
  # and explain how to create it
197
197
  raise ImportError("settings.py file not found. Please create it in the same directory as the main.py file. See the documentation for more information.")
198
- _Utils.set_classes_settings(CLASSES)
199
- _Utils.set_productions_settings(PRODUCTIONS)
198
+ try:
199
+ # set the classes settings
200
+ _Utils.set_classes_settings(settings.CLASSES)
201
+ except AttributeError:
202
+ print("No classes to register")
203
+ try:
204
+ # set the productions settings
205
+ _Utils.set_productions_settings(settings.PRODUCTIONS)
206
+ except AttributeError:
207
+ print("No productions to register")
208
+
200
209
 
201
210
 
202
211
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iris-pex-embedded-python
3
- Version: 2.3.4
3
+ Version: 2.3.8
4
4
  Summary: iris_pex_embedded_python
5
5
  Home-page: https://github.com/grongierisc/interoperability-embedded-python
6
6
  Author: grongier
@@ -0,0 +1,47 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ src/grongier/__init__.py
6
+ src/grongier/cls/Grongier/PEX/BusinessOperation.cls
7
+ src/grongier/cls/Grongier/PEX/BusinessProcess.cls
8
+ src/grongier/cls/Grongier/PEX/BusinessService.cls
9
+ src/grongier/cls/Grongier/PEX/Common.cls
10
+ src/grongier/cls/Grongier/PEX/Director.cls
11
+ src/grongier/cls/Grongier/PEX/InboundAdapter.cls
12
+ src/grongier/cls/Grongier/PEX/Message.cls
13
+ src/grongier/cls/Grongier/PEX/OutboundAdapter.cls
14
+ src/grongier/cls/Grongier/PEX/PickleMessage.cls
15
+ src/grongier/cls/Grongier/PEX/Test.cls
16
+ src/grongier/cls/Grongier/PEX/Utils.cls
17
+ src/grongier/cls/Grongier/PEX/WSGI.cls
18
+ src/grongier/cls/Grongier/PEX/Duplex/Operation.cls
19
+ src/grongier/cls/Grongier/PEX/Duplex/Process.cls
20
+ src/grongier/cls/Grongier/PEX/Duplex/Service.cls
21
+ src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls
22
+ src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls
23
+ src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls
24
+ src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls
25
+ src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls
26
+ src/grongier/pex/__init__.py
27
+ src/grongier/pex/__main__.py
28
+ src/grongier/pex/_business_host.py
29
+ src/grongier/pex/_business_operation.py
30
+ src/grongier/pex/_business_process.py
31
+ src/grongier/pex/_business_service.py
32
+ src/grongier/pex/_cli.py
33
+ src/grongier/pex/_common.py
34
+ src/grongier/pex/_director.py
35
+ src/grongier/pex/_inbound_adapter.py
36
+ src/grongier/pex/_message.py
37
+ src/grongier/pex/_outbound_adapter.py
38
+ src/grongier/pex/_pickle_message.py
39
+ src/grongier/pex/_private_session_duplex.py
40
+ src/grongier/pex/_private_session_process.py
41
+ src/grongier/pex/_utils.py
42
+ src/iris_pex_embedded_python.egg-info/PKG-INFO
43
+ src/iris_pex_embedded_python.egg-info/SOURCES.txt
44
+ src/iris_pex_embedded_python.egg-info/dependency_links.txt
45
+ src/iris_pex_embedded_python.egg-info/entry_points.txt
46
+ src/iris_pex_embedded_python.egg-info/requires.txt
47
+ src/iris_pex_embedded_python.egg-info/top_level.txt
@@ -1,45 +0,0 @@
1
- LICENSE
2
- README.md
3
- pyproject.toml
4
- setup.py
5
- src/grongier/pex/__init__.py
6
- src/grongier/pex/__main__.py
7
- src/grongier/pex/_business_host.py
8
- src/grongier/pex/_business_operation.py
9
- src/grongier/pex/_business_process.py
10
- src/grongier/pex/_business_service.py
11
- src/grongier/pex/_cli.py
12
- src/grongier/pex/_common.py
13
- src/grongier/pex/_director.py
14
- src/grongier/pex/_inbound_adapter.py
15
- src/grongier/pex/_message.py
16
- src/grongier/pex/_outbound_adapter.py
17
- src/grongier/pex/_pickle_message.py
18
- src/grongier/pex/_private_session_duplex.py
19
- src/grongier/pex/_private_session_process.py
20
- src/grongier/pex/_utils.py
21
- src/grongier/pex/data/PEX/BusinessOperation.cls
22
- src/grongier/pex/data/PEX/BusinessProcess.cls
23
- src/grongier/pex/data/PEX/BusinessService.cls
24
- src/grongier/pex/data/PEX/Common.cls
25
- src/grongier/pex/data/PEX/Director.cls
26
- src/grongier/pex/data/PEX/InboundAdapter.cls
27
- src/grongier/pex/data/PEX/Message.cls
28
- src/grongier/pex/data/PEX/OutboundAdapter.cls
29
- src/grongier/pex/data/PEX/PickleMessage.cls
30
- src/grongier/pex/data/PEX/Test.cls
31
- src/grongier/pex/data/PEX/Utils.cls
32
- src/grongier/pex/data/PEX/Duplex/Operation.cls
33
- src/grongier/pex/data/PEX/Duplex/Process.cls
34
- src/grongier/pex/data/PEX/Duplex/Service.cls
35
- src/grongier/pex/data/PEX/PrivateSession/Duplex.cls
36
- src/grongier/pex/data/PEX/PrivateSession/Message/Ack.cls
37
- src/grongier/pex/data/PEX/PrivateSession/Message/Poll.cls
38
- src/grongier/pex/data/PEX/PrivateSession/Message/Start.cls
39
- src/grongier/pex/data/PEX/PrivateSession/Message/Stop.cls
40
- src/iris_pex_embedded_python.egg-info/PKG-INFO
41
- src/iris_pex_embedded_python.egg-info/SOURCES.txt
42
- src/iris_pex_embedded_python.egg-info/dependency_links.txt
43
- src/iris_pex_embedded_python.egg-info/entry_points.txt
44
- src/iris_pex_embedded_python.egg-info/requires.txt
45
- src/iris_pex_embedded_python.egg-info/top_level.txt