iris-pex-embedded-python 3.2.1b2__tar.gz → 3.3.0b1__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.
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/pyproject.toml +1 -1
- iris_pex_embedded_python-3.3.0b1/src/iop/_async_request.py +62 -0
- iris_pex_embedded_python-3.3.0b1/src/iop/_business_host.py +240 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_business_operation.py +6 -4
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_business_process.py +12 -10
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_business_service.py +3 -2
- iris_pex_embedded_python-3.3.0b1/src/iop/_cli.py +196 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_common.py +12 -75
- iris_pex_embedded_python-3.3.0b1/src/iop/_decorators.py +48 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_director.py +3 -2
- iris_pex_embedded_python-3.3.0b1/src/iop/_dispatch.py +219 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_log_manager.py +20 -12
- iris_pex_embedded_python-3.3.0b1/src/iop/_message_validator.py +41 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_private_session_duplex.py +11 -10
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_private_session_process.py +7 -7
- iris_pex_embedded_python-3.3.0b1/src/iop/_serialization.py +196 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_utils.py +27 -19
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iris_pex_embedded_python.egg-info/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +5 -0
- iris_pex_embedded_python-3.2.1b2/src/iop/_business_host.py +0 -675
- iris_pex_embedded_python-3.2.1b2/src/iop/_cli.py +0 -141
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/LICENSE +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/README.md +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/setup.cfg +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/setup.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Common.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Director.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Message.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Test.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/PEX/Utils.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/cls/Grongier/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/__main__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/_business_host.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/_cli.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/_common.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/_director.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/_utils.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/grongier/pex/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_BufferReader.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_BufferWriter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_ConnectionInformation.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_ConnectionParameters.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_Constant.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_DBList.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_Device.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_GatewayContext.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_GatewayException.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_GatewayUtility.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRIS.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISConnection.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISEmbedded.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISGlobalNode.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISGlobalNodeView.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISIterator.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISList.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISNative.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISOREF.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISObject.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_IRISReference.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_InStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_LegacyIterator.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_ListItem.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_ListReader.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_ListWriter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_LogFileStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_MessageHeader.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_OutStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_PrintStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_PythonGateway.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/_SharedMemorySocket.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/__main__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_Column.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_DBAPI.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_Descriptor.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_IRISStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_Message.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_Parameter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_ParameterCollection.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_ResultSetRow.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/_SQLType.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/preparser/_PreParser.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/preparser/_Scanner.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/preparser/_Token.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/preparser/_TokenList.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/dbapi/preparser/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_BusinessHost.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_BusinessOperation.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_BusinessProcess.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_BusinessService.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_Common.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_Director.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_IRISBusinessOperation.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_IRISBusinessService.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_IRISInboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_IRISOutboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_InboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_Message.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/_OutboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/intersystems_iris/pex/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/__main__.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_inbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_message.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_outbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_pickle_message.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Common.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Director.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Message.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Test.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/cls/IOP/Utils.cls +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/irisnative/_IRISNative.py +0 -0
- {iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/irisnative/__init__.py +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import iris
|
|
3
|
+
from typing import Any, Optional, Union
|
|
4
|
+
from iop._dispatch import dispatch_deserializer, dispatch_serializer
|
|
5
|
+
from iop._message import _Message as Message
|
|
6
|
+
|
|
7
|
+
class AsyncRequest(asyncio.Future):
|
|
8
|
+
_message_header_id: int = 0
|
|
9
|
+
_queue_name: str = ""
|
|
10
|
+
_end_time: int = 0
|
|
11
|
+
_response: Any = None
|
|
12
|
+
_done: bool = False
|
|
13
|
+
|
|
14
|
+
def __init__(self, target: str, request: Union[Message, Any],
|
|
15
|
+
timeout: int = -1, description: Optional[str] = None, host: Optional[Any] = None) -> None:
|
|
16
|
+
super().__init__()
|
|
17
|
+
self.target = target
|
|
18
|
+
self.request = request
|
|
19
|
+
self.timeout = timeout
|
|
20
|
+
self.description = description
|
|
21
|
+
self.host = host
|
|
22
|
+
self._iris_handle = host.iris_handle
|
|
23
|
+
asyncio.create_task(self.send())
|
|
24
|
+
|
|
25
|
+
async def send(self) -> None:
|
|
26
|
+
# init parameters
|
|
27
|
+
message_header_id = iris.ref()
|
|
28
|
+
queue_name = iris.ref()
|
|
29
|
+
end_time = iris.ref()
|
|
30
|
+
request = dispatch_serializer(self.request)
|
|
31
|
+
|
|
32
|
+
# send request
|
|
33
|
+
self._iris_handle.dispatchSendRequestAsyncNG(
|
|
34
|
+
self.target, request, self.timeout, self.description,
|
|
35
|
+
message_header_id, queue_name, end_time)
|
|
36
|
+
|
|
37
|
+
# get byref values
|
|
38
|
+
self._message_header_id = message_header_id.value
|
|
39
|
+
self._queue_name = queue_name.value
|
|
40
|
+
self._end_time = end_time.value
|
|
41
|
+
|
|
42
|
+
while not self._done:
|
|
43
|
+
await asyncio.sleep(0.1)
|
|
44
|
+
self.is_done()
|
|
45
|
+
|
|
46
|
+
self.set_result(self._response)
|
|
47
|
+
|
|
48
|
+
def is_done(self) -> None:
|
|
49
|
+
response = iris.ref()
|
|
50
|
+
status = self._iris_handle.dispatchIsRequestDone(self.timeout, self._end_time,
|
|
51
|
+
self._queue_name, self._message_header_id,
|
|
52
|
+
response)
|
|
53
|
+
|
|
54
|
+
self._response = dispatch_deserializer(response.value)
|
|
55
|
+
|
|
56
|
+
if status == 2: # message found
|
|
57
|
+
self._done = True
|
|
58
|
+
elif status == 1: # message not found
|
|
59
|
+
pass
|
|
60
|
+
else:
|
|
61
|
+
self._done = True
|
|
62
|
+
self.set_exception(RuntimeError(iris.system.Status.GetOneStatusText(status)))
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import asyncio
|
|
3
|
+
import base64
|
|
4
|
+
import codecs
|
|
5
|
+
import datetime
|
|
6
|
+
import decimal
|
|
7
|
+
import importlib
|
|
8
|
+
import inspect
|
|
9
|
+
import iris
|
|
10
|
+
import json
|
|
11
|
+
import pickle
|
|
12
|
+
import uuid
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from functools import wraps
|
|
15
|
+
from inspect import getsource, signature
|
|
16
|
+
from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple, Type, Union
|
|
17
|
+
|
|
18
|
+
from dacite import Config, from_dict
|
|
19
|
+
|
|
20
|
+
from iop._common import _Common
|
|
21
|
+
from iop._message import _Message as Message
|
|
22
|
+
from iop._utils import _Utils
|
|
23
|
+
from iop._decorators import (
|
|
24
|
+
input_serializer, input_serializer_param, output_deserializer,
|
|
25
|
+
input_deserializer, output_serializer
|
|
26
|
+
)
|
|
27
|
+
from iop._serialization import IrisJSONEncoder, IrisJSONDecoder
|
|
28
|
+
from iop._dispatch import (
|
|
29
|
+
dispatch_serializer, dispatch_deserializer,
|
|
30
|
+
dispach_message, create_dispatch
|
|
31
|
+
)
|
|
32
|
+
from iop._async_request import AsyncRequest
|
|
33
|
+
|
|
34
|
+
class _BusinessHost(_Common):
|
|
35
|
+
"""Base class for business components that defines common methods.
|
|
36
|
+
|
|
37
|
+
This is a superclass for BusinessService, BusinessProcess, and BusinessOperation that
|
|
38
|
+
defines common functionality like message serialization/deserialization and request handling.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
buffer: int = 64000
|
|
42
|
+
DISPATCH: List[Tuple[str, str]] = []
|
|
43
|
+
|
|
44
|
+
@input_serializer_param(1, 'request')
|
|
45
|
+
@output_deserializer
|
|
46
|
+
def send_request_sync(self, target: str, request: Union[Message, Any],
|
|
47
|
+
timeout: int = -1, description: Optional[str] = None) -> Any:
|
|
48
|
+
"""Send message synchronously to target component.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
target: Name of target component
|
|
52
|
+
request: Message to send
|
|
53
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
54
|
+
description: Optional description for logging
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
Response from target component
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
TypeError: If request is invalid type
|
|
61
|
+
"""
|
|
62
|
+
return self.iris_handle.dispatchSendRequestSync(target, request, timeout, description)
|
|
63
|
+
|
|
64
|
+
@input_serializer_param(1, 'request')
|
|
65
|
+
def send_request_async(self, target: str, request: Union[Message, Any],
|
|
66
|
+
description: Optional[str] = None) -> None:
|
|
67
|
+
"""Send message asynchronously to target component.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
target: Name of target component
|
|
71
|
+
request: Message to send
|
|
72
|
+
description: Optional description for logging
|
|
73
|
+
|
|
74
|
+
Raises:
|
|
75
|
+
TypeError: If request is invalid type
|
|
76
|
+
"""
|
|
77
|
+
return self.iris_handle.dispatchSendRequestAsync(target, request, description)
|
|
78
|
+
|
|
79
|
+
async def send_request_async_ng(self, target: str, request: Union[Message, Any],
|
|
80
|
+
timeout: int = -1, description: Optional[str] = None) -> Any:
|
|
81
|
+
"""Send message asynchronously to target component with asyncio.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
target: Name of target component
|
|
85
|
+
request: Message to send
|
|
86
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
87
|
+
description: Optional description for logging
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Response from target component
|
|
91
|
+
"""
|
|
92
|
+
return await AsyncRequest(target, request, timeout, description, self)
|
|
93
|
+
|
|
94
|
+
def send_multi_request_sync(self, target_request: List[Tuple[str, Union[Message, Any]]],
|
|
95
|
+
timeout: int = -1, description: Optional[str] = None) -> List[Tuple[str, Union[Message, Any], Any, int]]:
|
|
96
|
+
"""Send multiple messages synchronously to target components.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
target_request: List of tuples (target, request) to send
|
|
100
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
101
|
+
description: Optional description for logging
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
List of tuples (target, request, response, status)
|
|
105
|
+
"""
|
|
106
|
+
# create a list of iris.Ens.CallStructure for each target_request
|
|
107
|
+
call_list = []
|
|
108
|
+
# sanity check
|
|
109
|
+
if not isinstance(target_request, list):
|
|
110
|
+
raise TypeError("The target_request parameter must be a list")
|
|
111
|
+
if len(target_request) == 0:
|
|
112
|
+
raise ValueError("The target_request parameter must not be empty")
|
|
113
|
+
# check if the target_request is a list of tuple of 2 elements
|
|
114
|
+
if not all(isinstance(item, tuple) and len(item) == 2 for item in target_request):
|
|
115
|
+
raise TypeError("The target_request parameter must be a list of tuple of 2 elements")
|
|
116
|
+
|
|
117
|
+
for target, request in target_request:
|
|
118
|
+
call = iris.cls("Ens.CallStructure")._New()
|
|
119
|
+
call.TargetDispatchName = target
|
|
120
|
+
call.Request = dispatch_serializer(request)
|
|
121
|
+
call_list.append(call)
|
|
122
|
+
# call the dispatchSendMultiRequestSync method
|
|
123
|
+
response_list = self.iris_handle.dispatchSendRequestSyncMultiple(call_list, timeout)
|
|
124
|
+
# create a list of tuple (target, request, response, status)
|
|
125
|
+
result = []
|
|
126
|
+
for i in range(len(target_request)):
|
|
127
|
+
result.append(
|
|
128
|
+
(target_request[i][0],
|
|
129
|
+
target_request[i][1],
|
|
130
|
+
dispatch_deserializer(response_list[i].Response),
|
|
131
|
+
response_list[i].ResponseCode
|
|
132
|
+
))
|
|
133
|
+
return result
|
|
134
|
+
|
|
135
|
+
@staticmethod
|
|
136
|
+
def OnGetConnections() -> Optional[List[str]]:
|
|
137
|
+
"""The OnGetConnections() method returns all of the targets of any SendRequestSync or SendRequestAsync
|
|
138
|
+
calls for the class. Implement this method to allow connections between components to show up in
|
|
139
|
+
the interoperability UI.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
An IRISList containing all targets for this class. Default is None.
|
|
143
|
+
"""
|
|
144
|
+
return None
|
|
145
|
+
|
|
146
|
+
def SendRequestSync(self, target: str, request: Union[Message, Any],
|
|
147
|
+
timeout: int = -1, description: Optional[str] = None) -> Any:
|
|
148
|
+
"""DEPRECATED: use send_request_sync.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
target: The target of the request
|
|
152
|
+
request: The request to send
|
|
153
|
+
timeout: The timeout in seconds, -1 means wait forever
|
|
154
|
+
description: A string that describes the request
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
The response from the target component
|
|
158
|
+
"""
|
|
159
|
+
return self.send_request_sync(target, request, timeout, description)
|
|
160
|
+
|
|
161
|
+
def SendRequestAsync(self, target: str, request: Union[Message, Any],
|
|
162
|
+
description: Optional[str] = None) -> None:
|
|
163
|
+
"""DEPRECATED: use send_request_async.
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
target: The target of the request
|
|
167
|
+
request: The request to send
|
|
168
|
+
description: A string that describes the request
|
|
169
|
+
"""
|
|
170
|
+
return self.send_request_async(target, request, description)
|
|
171
|
+
|
|
172
|
+
@staticmethod
|
|
173
|
+
def getAdapterType() -> Optional[str]:
|
|
174
|
+
"""DEPRECATED: use get_adapter_type.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Name of the registered Adapter
|
|
178
|
+
"""
|
|
179
|
+
return
|
|
180
|
+
|
|
181
|
+
@staticmethod
|
|
182
|
+
def get_adapter_type() -> Optional[str]:
|
|
183
|
+
"""Returns the name of the registered Adapter.
|
|
184
|
+
|
|
185
|
+
Returns:
|
|
186
|
+
Name of the registered Adapter
|
|
187
|
+
"""
|
|
188
|
+
return
|
|
189
|
+
|
|
190
|
+
def on_get_connections(self) -> List[str]:
|
|
191
|
+
"""The OnGetConnections() method returns all of the targets of any SendRequestSync or SendRequestAsync
|
|
192
|
+
calls for the class. Implement this method to allow connections between components to show up in
|
|
193
|
+
the interoperability UI.
|
|
194
|
+
|
|
195
|
+
Returns:
|
|
196
|
+
A list containing all targets for this class.
|
|
197
|
+
"""
|
|
198
|
+
## Parse the class code to find all invocations of send_request_sync and send_request_async
|
|
199
|
+
## and return the targets
|
|
200
|
+
targer_list = []
|
|
201
|
+
# get the source code of the class
|
|
202
|
+
source = getsource(self.__class__)
|
|
203
|
+
# find all invocations of send_request_sync and send_request_async
|
|
204
|
+
for method in ['send_request_sync', 'send_request_async', 'SendRequestSync', 'SendRequestAsync']:
|
|
205
|
+
i = source.find(method)
|
|
206
|
+
while i != -1:
|
|
207
|
+
j = source.find("(", i)
|
|
208
|
+
if j != -1:
|
|
209
|
+
k = source.find(",", j)
|
|
210
|
+
if k != -1:
|
|
211
|
+
target = source[j+1:k]
|
|
212
|
+
if target.find("=") != -1:
|
|
213
|
+
# it's a keyword argument, remove the keyword
|
|
214
|
+
target = target[target.find("=")+1:].strip()
|
|
215
|
+
if target not in targer_list:
|
|
216
|
+
targer_list.append(target)
|
|
217
|
+
i = source.find(method, i+1)
|
|
218
|
+
|
|
219
|
+
for target in targer_list:
|
|
220
|
+
# if target is a string, remove the quotes
|
|
221
|
+
if target[0] == "'" and target[-1] == "'":
|
|
222
|
+
targer_list[targer_list.index(target)] = target[1:-1]
|
|
223
|
+
elif target[0] == '"' and target[-1] == '"':
|
|
224
|
+
targer_list[targer_list.index(target)] = target[1:-1]
|
|
225
|
+
# if target is a variable, try to find the value of the variable
|
|
226
|
+
else:
|
|
227
|
+
self.on_init()
|
|
228
|
+
try:
|
|
229
|
+
if target.find("self.") != -1:
|
|
230
|
+
# it's a class variable
|
|
231
|
+
targer_list[targer_list.index(target)] = getattr(self, target[target.find(".")+1:])
|
|
232
|
+
elif target.find(".") != -1:
|
|
233
|
+
# it's a class variable
|
|
234
|
+
targer_list[targer_list.index(target)] = getattr(getattr(self, target[:target.find(".")]), target[target.find(".")+1:])
|
|
235
|
+
else:
|
|
236
|
+
targer_list[targer_list.index(target)] = getattr(self, target)
|
|
237
|
+
except Exception as e:
|
|
238
|
+
pass
|
|
239
|
+
|
|
240
|
+
return targer_list
|
{iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_business_operation.py
RENAMED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
from typing import Any, List, Optional, Union, Tuple
|
|
3
3
|
from iop._business_host import _BusinessHost
|
|
4
|
+
from iop._decorators import input_deserializer, output_serializer, input_serializer, output_deserializer
|
|
5
|
+
from iop._dispatch import create_dispatch, dispach_message
|
|
4
6
|
|
|
5
7
|
class _BusinessOperation(_BusinessHost):
|
|
6
8
|
"""Business operation component that handles outbound communication.
|
|
@@ -45,15 +47,15 @@ class _BusinessOperation(_BusinessHost):
|
|
|
45
47
|
|
|
46
48
|
def _dispatch_on_init(self, host_object: Any) -> None:
|
|
47
49
|
"""For internal use only."""
|
|
48
|
-
self
|
|
50
|
+
create_dispatch(self)
|
|
49
51
|
self.on_init()
|
|
50
52
|
return
|
|
51
53
|
|
|
52
|
-
@
|
|
53
|
-
@
|
|
54
|
+
@input_deserializer
|
|
55
|
+
@output_serializer
|
|
54
56
|
def _dispatch_on_message(self, request: Any) -> Any:
|
|
55
57
|
"""For internal use only."""
|
|
56
|
-
return self
|
|
58
|
+
return dispach_message(self,request)
|
|
57
59
|
|
|
58
60
|
def OnMessage(self, request: Any) -> Any:
|
|
59
61
|
"""DEPRECATED : use on_message
|
{iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_business_process.py
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from typing import Any, List, Optional, Union
|
|
2
2
|
from iop._business_host import _BusinessHost
|
|
3
|
+
from iop._decorators import input_deserializer, input_serializer_param, output_serializer, input_serializer, output_deserializer
|
|
4
|
+
from iop._dispatch import create_dispatch, dispach_message
|
|
3
5
|
|
|
4
6
|
class _BusinessProcess(_BusinessHost):
|
|
5
7
|
"""Business process component that contains routing and transformation logic.
|
|
@@ -60,7 +62,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
60
62
|
"""
|
|
61
63
|
return self.OnComplete(request, response)
|
|
62
64
|
|
|
63
|
-
@
|
|
65
|
+
@input_serializer_param(0,'response')
|
|
64
66
|
def reply(self, response: Any) -> None:
|
|
65
67
|
"""Send the specified response to the production component that sent the initial request.
|
|
66
68
|
|
|
@@ -69,7 +71,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
69
71
|
"""
|
|
70
72
|
return self.iris_handle.dispatchReply(response)
|
|
71
73
|
|
|
72
|
-
@
|
|
74
|
+
@input_serializer_param(1,'request')
|
|
73
75
|
def send_request_async(self, target: str, request: Any, response_required: bool=True, completion_key: Optional[str]=None, description: Optional[str]=None) -> None:
|
|
74
76
|
"""Send the specified message to the target business process or business operation asynchronously.
|
|
75
77
|
|
|
@@ -139,7 +141,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
139
141
|
def _dispatch_on_init(self, host_object: Any) -> None:
|
|
140
142
|
"""For internal use only."""
|
|
141
143
|
self._restore_persistent_properties(host_object)
|
|
142
|
-
self
|
|
144
|
+
create_dispatch(self)
|
|
143
145
|
self.on_init()
|
|
144
146
|
self._save_persistent_properties(host_object)
|
|
145
147
|
return
|
|
@@ -151,17 +153,17 @@ class _BusinessProcess(_BusinessHost):
|
|
|
151
153
|
self._save_persistent_properties(host_object)
|
|
152
154
|
return
|
|
153
155
|
|
|
154
|
-
@
|
|
155
|
-
@
|
|
156
|
+
@input_deserializer
|
|
157
|
+
@output_serializer
|
|
156
158
|
def _dispatch_on_request(self, host_object: Any, request: Any) -> Any:
|
|
157
159
|
"""For internal use only."""
|
|
158
160
|
self._restore_persistent_properties(host_object)
|
|
159
|
-
return_object = self
|
|
161
|
+
return_object = dispach_message(self,request)
|
|
160
162
|
self._save_persistent_properties(host_object)
|
|
161
163
|
return return_object
|
|
162
164
|
|
|
163
|
-
@
|
|
164
|
-
@
|
|
165
|
+
@input_deserializer
|
|
166
|
+
@output_serializer
|
|
165
167
|
def _dispatch_on_response(self, host_object: Any, request: Any, response: Any, call_request: Any, call_response: Any, completion_key: str) -> Any:
|
|
166
168
|
"""For internal use only."""
|
|
167
169
|
self._restore_persistent_properties(host_object)
|
|
@@ -169,8 +171,8 @@ class _BusinessProcess(_BusinessHost):
|
|
|
169
171
|
self._save_persistent_properties(host_object)
|
|
170
172
|
return return_object
|
|
171
173
|
|
|
172
|
-
@
|
|
173
|
-
@
|
|
174
|
+
@input_deserializer
|
|
175
|
+
@output_serializer
|
|
174
176
|
def _dispatch_on_complete(self, host_object: Any, request: Any, response: Any) -> Any:
|
|
175
177
|
"""For internal use only."""
|
|
176
178
|
self._restore_persistent_properties(host_object)
|
{iris_pex_embedded_python-3.2.1b2 → iris_pex_embedded_python-3.3.0b1}/src/iop/_business_service.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
from iop._business_host import _BusinessHost
|
|
3
|
+
from iop._decorators import input_deserializer, output_serializer, input_serializer, output_deserializer
|
|
3
4
|
|
|
4
5
|
class _BusinessService(_BusinessHost):
|
|
5
6
|
""" This class is responsible for receiving the data from external system and sending it to business processes or business operations in the production.
|
|
@@ -36,8 +37,8 @@ class _BusinessService(_BusinessHost):
|
|
|
36
37
|
self.Adapter = self.adapter = handle_partner
|
|
37
38
|
return
|
|
38
39
|
|
|
39
|
-
@
|
|
40
|
-
@
|
|
40
|
+
@input_deserializer
|
|
41
|
+
@output_serializer
|
|
41
42
|
def _dispatch_on_process_input(self, request):
|
|
42
43
|
""" For internal use only. """
|
|
43
44
|
return self.on_process_input(request)
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
import argparse
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from enum import Enum, auto
|
|
7
|
+
import sys
|
|
8
|
+
from typing import Optional, Callable
|
|
9
|
+
from importlib.metadata import version
|
|
10
|
+
|
|
11
|
+
from iop._director import _Director
|
|
12
|
+
from iop._utils import _Utils
|
|
13
|
+
|
|
14
|
+
class CommandType(Enum):
|
|
15
|
+
DEFAULT = auto()
|
|
16
|
+
LIST = auto()
|
|
17
|
+
START = auto()
|
|
18
|
+
STOP = auto()
|
|
19
|
+
KILL = auto()
|
|
20
|
+
RESTART = auto()
|
|
21
|
+
STATUS = auto()
|
|
22
|
+
TEST = auto()
|
|
23
|
+
VERSION = auto()
|
|
24
|
+
EXPORT = auto()
|
|
25
|
+
MIGRATE = auto()
|
|
26
|
+
LOG = auto()
|
|
27
|
+
INIT = auto()
|
|
28
|
+
HELP = auto()
|
|
29
|
+
|
|
30
|
+
@dataclass
|
|
31
|
+
class CommandArgs:
|
|
32
|
+
"""Container for parsed command arguments"""
|
|
33
|
+
default: Optional[str] = None
|
|
34
|
+
list: bool = False
|
|
35
|
+
start: Optional[str] = None
|
|
36
|
+
detach: bool = False
|
|
37
|
+
stop: bool = False
|
|
38
|
+
kill: bool = False
|
|
39
|
+
restart: bool = False
|
|
40
|
+
status: bool = False
|
|
41
|
+
migrate: Optional[str] = None
|
|
42
|
+
export: Optional[str] = None
|
|
43
|
+
version: bool = False
|
|
44
|
+
log: Optional[str] = None
|
|
45
|
+
init: Optional[str] = None
|
|
46
|
+
test: Optional[str] = None
|
|
47
|
+
classname: Optional[str] = None
|
|
48
|
+
body: Optional[str] = None
|
|
49
|
+
|
|
50
|
+
class Command:
|
|
51
|
+
def __init__(self, args: CommandArgs):
|
|
52
|
+
self.args = args
|
|
53
|
+
|
|
54
|
+
def execute(self) -> None:
|
|
55
|
+
command_type = self._determine_command_type()
|
|
56
|
+
command_handlers = {
|
|
57
|
+
CommandType.DEFAULT: self._handle_default,
|
|
58
|
+
CommandType.LIST: self._handle_list,
|
|
59
|
+
CommandType.START: self._handle_start,
|
|
60
|
+
CommandType.STOP: self._handle_stop,
|
|
61
|
+
CommandType.KILL: self._handle_kill,
|
|
62
|
+
CommandType.RESTART: self._handle_restart,
|
|
63
|
+
CommandType.STATUS: self._handle_status,
|
|
64
|
+
CommandType.TEST: self._handle_test,
|
|
65
|
+
CommandType.VERSION: self._handle_version,
|
|
66
|
+
CommandType.EXPORT: self._handle_export,
|
|
67
|
+
CommandType.MIGRATE: self._handle_migrate,
|
|
68
|
+
CommandType.LOG: self._handle_log,
|
|
69
|
+
CommandType.INIT: self._handle_init,
|
|
70
|
+
CommandType.HELP: self._handle_help
|
|
71
|
+
}
|
|
72
|
+
handler = command_handlers.get(command_type)
|
|
73
|
+
if handler:
|
|
74
|
+
handler()
|
|
75
|
+
|
|
76
|
+
def _determine_command_type(self) -> CommandType:
|
|
77
|
+
if self.args.default: return CommandType.DEFAULT
|
|
78
|
+
if self.args.list: return CommandType.LIST
|
|
79
|
+
if self.args.start: return CommandType.START
|
|
80
|
+
if self.args.stop: return CommandType.STOP
|
|
81
|
+
if self.args.kill: return CommandType.KILL
|
|
82
|
+
if self.args.restart: return CommandType.RESTART
|
|
83
|
+
if self.args.status: return CommandType.STATUS
|
|
84
|
+
if self.args.test: return CommandType.TEST
|
|
85
|
+
if self.args.version: return CommandType.VERSION
|
|
86
|
+
if self.args.export: return CommandType.EXPORT
|
|
87
|
+
if self.args.migrate: return CommandType.MIGRATE
|
|
88
|
+
if self.args.log: return CommandType.LOG
|
|
89
|
+
if self.args.init: return CommandType.INIT
|
|
90
|
+
return CommandType.HELP
|
|
91
|
+
|
|
92
|
+
def _handle_default(self) -> None:
|
|
93
|
+
if self.args.default == 'not_set':
|
|
94
|
+
print(_Director.get_default_production())
|
|
95
|
+
else:
|
|
96
|
+
_Director.set_default_production(self.args.default)
|
|
97
|
+
|
|
98
|
+
def _handle_list(self) -> None:
|
|
99
|
+
dikt = _Director.list_productions()
|
|
100
|
+
print(json.dumps(dikt, indent=4))
|
|
101
|
+
|
|
102
|
+
def _handle_start(self) -> None:
|
|
103
|
+
production_name = self.args.start if self.args.start != 'not_set' else _Director.get_default_production()
|
|
104
|
+
if self.args.detach:
|
|
105
|
+
_Director.start_production(production_name)
|
|
106
|
+
print(f"Production {production_name} started")
|
|
107
|
+
else:
|
|
108
|
+
_Director.start_production_with_log(production_name)
|
|
109
|
+
|
|
110
|
+
def _handle_stop(self) -> None:
|
|
111
|
+
_Director.stop_production()
|
|
112
|
+
print(f"Production {_Director.get_default_production()} stopped")
|
|
113
|
+
|
|
114
|
+
def _handle_kill(self) -> None:
|
|
115
|
+
_Director.shutdown_production()
|
|
116
|
+
|
|
117
|
+
def _handle_restart(self) -> None:
|
|
118
|
+
_Director.restart_production()
|
|
119
|
+
|
|
120
|
+
def _handle_status(self) -> None:
|
|
121
|
+
print(json.dumps(_Director.status_production(), indent=4))
|
|
122
|
+
|
|
123
|
+
def _handle_test(self) -> None:
|
|
124
|
+
test_name = None if self.args.test == 'not_set' else self.args.test
|
|
125
|
+
response = _Director.test_component(
|
|
126
|
+
test_name,
|
|
127
|
+
classname=self.args.classname if self.args.classname != 'not_set' else None,
|
|
128
|
+
body=self.args.body if self.args.body != 'not_set' else None
|
|
129
|
+
)
|
|
130
|
+
print(response)
|
|
131
|
+
|
|
132
|
+
def _handle_version(self) -> None:
|
|
133
|
+
print(version('iris-pex-embedded-python'))
|
|
134
|
+
|
|
135
|
+
def _handle_export(self) -> None:
|
|
136
|
+
export_name = _Director.get_default_production() if self.args.export == 'not_set' else self.args.export
|
|
137
|
+
print(json.dumps(_Utils.export_production(export_name), indent=4))
|
|
138
|
+
|
|
139
|
+
def _handle_migrate(self) -> None:
|
|
140
|
+
migrate_path = self.args.migrate
|
|
141
|
+
if not os.path.isabs(migrate_path):
|
|
142
|
+
migrate_path = os.path.join(os.getcwd(), migrate_path)
|
|
143
|
+
_Utils.migrate(migrate_path)
|
|
144
|
+
|
|
145
|
+
def _handle_log(self) -> None:
|
|
146
|
+
log_name = _Director.get_default_production() if self.args.log == 'not_set' else self.args.log
|
|
147
|
+
print(_Director.get_production_log(log_name))
|
|
148
|
+
|
|
149
|
+
def _handle_init(self) -> None:
|
|
150
|
+
_Utils.setup(None)
|
|
151
|
+
|
|
152
|
+
def _handle_help(self) -> None:
|
|
153
|
+
create_parser().print_help()
|
|
154
|
+
print(f"\nDefault production: {_Director.get_default_production()}")
|
|
155
|
+
|
|
156
|
+
def create_parser() -> argparse.ArgumentParser:
|
|
157
|
+
"""Create and configure argument parser"""
|
|
158
|
+
main_parser = argparse.ArgumentParser()
|
|
159
|
+
parser = main_parser.add_mutually_exclusive_group()
|
|
160
|
+
|
|
161
|
+
# Main commands
|
|
162
|
+
parser.add_argument('-d', '--default', help='set the default production', nargs='?', const='not_set')
|
|
163
|
+
parser.add_argument('-l', '--list', help='list productions', action='store_true')
|
|
164
|
+
parser.add_argument('-s', '--start', help='start a production', nargs='?', const='not_set')
|
|
165
|
+
parser.add_argument('-S', '--stop', help='stop a production', action='store_true')
|
|
166
|
+
parser.add_argument('-k', '--kill', help='kill a production', action='store_true')
|
|
167
|
+
parser.add_argument('-r', '--restart', help='restart a production', action='store_true')
|
|
168
|
+
parser.add_argument('-x', '--status', help='status a production', action='store_true')
|
|
169
|
+
parser.add_argument('-m', '-M', '--migrate', help='migrate production and classes with settings file')
|
|
170
|
+
parser.add_argument('-e', '--export', help='export a production', nargs='?', const='not_set')
|
|
171
|
+
parser.add_argument('-v', '--version', help='display version', action='store_true')
|
|
172
|
+
parser.add_argument('-L', '--log', help='display log', nargs='?', const='not_set')
|
|
173
|
+
parser.add_argument('-i', '--init', help='init the pex module in iris', nargs='?', const='not_set')
|
|
174
|
+
parser.add_argument('-t', '--test', help='test the pex module in iris', nargs='?', const='not_set')
|
|
175
|
+
|
|
176
|
+
# Command groups
|
|
177
|
+
start = main_parser.add_argument_group('start arguments')
|
|
178
|
+
start.add_argument('-D', '--detach', help='start a production in detach mode', action='store_true')
|
|
179
|
+
|
|
180
|
+
test = main_parser.add_argument_group('test arguments')
|
|
181
|
+
test.add_argument('-C', '--classname', help='test classname', nargs='?', const='not_set')
|
|
182
|
+
test.add_argument('-B', '--body', help='test body', nargs='?', const='not_set')
|
|
183
|
+
|
|
184
|
+
return main_parser
|
|
185
|
+
|
|
186
|
+
def main(argv=None) -> None:
|
|
187
|
+
parser = create_parser()
|
|
188
|
+
args = parser.parse_args(argv)
|
|
189
|
+
cmd_args = CommandArgs(**vars(args))
|
|
190
|
+
|
|
191
|
+
command = Command(cmd_args)
|
|
192
|
+
command.execute()
|
|
193
|
+
sys.exit(0)
|
|
194
|
+
|
|
195
|
+
if __name__ == '__main__':
|
|
196
|
+
main()
|