Swiss Army knife package for EOQ3
Project description
eoq3utils - Swiss Army knife package for EOQ3
Contains API, CLI and service utils that ease the working with EOQ3.
Furthermore, installing this will all EOQ3 packages at once, i.e. , eoq3 , eoq3conceptsgen , eoq3pyaccesscontroller , eoq3pyactions , eoq3pyecoreutils , eoq3pyecoremdb , eoq3pyecorempl , eoq3autobahnws , eoq3tcp.
Usage
API
Domain Factory
To create and close different kind of domains easily, CreateDomain and CleanUpDOmain can be used. The example shows how to create and clean up different types of domains with the same commands. Parameters are individual.
from eoq3utils import DOMAIN_TYPES, CreateDomain, CleanUpDomain
PARAMS = []
PARAMS.append( ParameterSet(n,{"kindOfDomain" : DOMAIN_TYPES.LOCAL ,"domainSettings": {}})); #PyecoreMdb
PARAMS.append( ParameterSet(n,{"kindOfDomain" : DOMAIN_TYPES.LOCALPROCESS ,"domainSettings": {}})); #DomainToProcessWrapper
PARAMS.append( ParameterSet(n,{"kindOfDomain" : DOMAIN_TYPES.MULTITHREAD_DOMAINPOOL ,"domainSettings": {"numberOfDomainWorkers" : 2}})); #DomainPool
PARAMS.append( ParameterSet(n,{"kindOfDomain" : DOMAIN_TYPES.MULTIPROCESS_DOMAINPOOL,"domainSettings": {"numberOfDomainWorkers" : 2}})); #DomainPool in process
PARAMS.append( ParameterSet(n,{"kindOfDomain" : DOMAIN_TYPES.TCPCLIENT ,"domainSettings": {"host": "127.0.0.1", "port": 6141, "startServer": False }})); # TCP client only
PARAMS.append( ParameterSet(n,{"kindOfDomain" : DOMAIN_TYPES.WSCLIENT ,"domainSettings": {"host": "127.0.0.1", "port": 5141, "startServer": True }})); # WS client and host (server is also cleaned up automatically with CleanUpDomain)
for p in PARAMS:
domain = CreateDomain(p.kindOfDomain, p.domainSettings)
#TODO: do something with the domain
CleanUpDomain(resource.domain)
CLI
Modules to interact with files and remote domains such as TCP and WS from the command line.
Commands
TODO
EOQ files
Uploading and downloading model information to EOQ files.
eoq3utils.cli.loadeoqfiletcpcli
Upload an eoq file to a TCP host:
python -m python -m eoq3utils.cli.loadeoqfiletcpcli --infile "m2model.eoq" --host "127.0.0.1" --port 6141
python -m python -m eoq3utils.cli.loadeoqfiletcpcli --infile "m1model.eoq" --host "127.0.0.1" --port 6141
eoq3utils.cli.loadeoqfilewscli
Upload eoq files to a WebSocket host:
python -m python -m eoq3utils.cli.loadeoqfilewscli --infile "m2model.eoq" --host "127.0.0.1" --port 5141
python -m python -m eoq3utils.cli.loadeoqfilewscli --infile "m1model.eoq" --host "127.0.0.1" --port 5141
eoq3utils.cli.saveeoqfiletcpcli
Download M2 model as eoq file from TCP host:
python -m eoq3utils.cli.saveeoqfiletcpcli --outfile "m2model.ecore" --rootobj "(/*MDB/*M2MODELS:0)" --host "127.0.0.1" --port 6141
The same for M1 model:
python -m eoq3utils.cli.saveeoqfiletcpcli --outfile "m1model.ecore" --rootobj "(/*MDB/*M1MODELS:0)" --host "127.0.0.1" --port 6141
eoq3utils.cli.saveeoqfilewscli
Download M2 model as eoq file from WebSocket host:
python -m eoq3utils.cli.saveeoqfilewscli --outfile "m2model.eoq" --rootobj "(/*MDB/*M2MODELS:0)" -savemetamodel 1 --host "127.0.0.1" --port 5141
The same for M1 model:
python -m eoq3utils.cli.saveeoqfilewscli --outfile "m1model.ecore" --rootobj "(/*MDB/*M1MODELS:0)" --host "127.0.0.1" --port 6141
ECORE Files
Uploading, downloading and converting ecore files.
eoq3utils.cli.ecorefiletoeoqfilecli
Eoq to ecore file conversion:
python -m eoq3utils.cli.ecorefiletoeoqfilecli --infile "m2model.ecore" --outfile "m2model.eoq"
python -m eoq3utils.cli.ecorefiletoeoqfilecli --infile "m1model.ecore" --outfile "m1model.eoq" --metafile "m2model.ecore"
eoq3utils.cli.ecorefiletoeoqfilecli
Eoq to ecore file conversion:
python -m eoq3utils.cli.eoqfiletoecorefilecli --infile "m2model.eoq" --outfile "m2model.ecore"
python -m eoq3utils.cli.eoqfiletoecorefilecli --infile "m1model.eoq" --outfile "m1model.eoq" --metafile "m2model.ecore"
eoq3utils.cli.saveecorefiletcpcli
Ecore file from TCP host downloading:
python -m eoq3utils.cli.saveecorefiletcpcli --outfile "m2model.ecore" --rootobj "(/*MDB/*M2MODELS:0)" --host "127.0.0.1" --port 6141
eoq3utils.cli.saveecorefilewscli
Ecore file from WebSocket host downloading:
python -m eoq3utils.cli.saveecorefilewscli --outfile "m1model.xmi" --rootobj "(/*MDB/*M1MODELS:0)" --metafile "m2model.ecore" -savemetamodel 1 --host "127.0.0.1" --port 5141
eoq3utils.cli.loadecorefiletcpcli
Ecore file to TCP host uploading:
python -m eoq3utils.cli.loadecorefiletcpcli --infile "m2model.ecore" --host "127.0.0.1" --port 6141
python -m eoq3utils.cli.loadecorefiletcpcli --infile "m1model.xmi" --metafile "m2model.ecore" --host "127.0.0.1" --port 6141
eoq3utils.cli.loadecorefilewscli
Ecore file to WebSocket host uploading:
python -m eoq3utils.cli.loadecorefilewscli --infile "m2model.ecore" --host "127.0.0.1" --port 5141
python -m eoq3utils.cli.loadecorefilewscli --infile "m1model.xmi" --metafile "m2model.ecore" --host "127.0.0.1" --port 5141
Service
TODO: make py ws server available here
Documentation
For more information see EOQ3 documentation: https://eoq.gitlab.io/doc/eoq3/
Author
2024 Bjoern Annighoefer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file eoq3utils-2.9.2.tar.gz
.
File metadata
- Download URL: eoq3utils-2.9.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87dbdc7eba8387f915c1878d29a404bb4ef99ad7e585aca2d7d3d36ea2fc031a |
|
MD5 | c34ddaba92033046e54d39ec3d41559c |
|
BLAKE2b-256 | 5e186b31cccb2be970e9ef63f2893ecaf46b2c12631dab81ca9366570d430684 |
File details
Details for the file eoq3utils-2.9.2-py3-none-any.whl
.
File metadata
- Download URL: eoq3utils-2.9.2-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 051d50c7d19ff648202f8bfc32f8b3512df25caf4cf54438209eafccdcde9a61 |
|
MD5 | 5f740240d0b8dbeb3009aa3f4469f6ca |
|
BLAKE2b-256 | e4a99d9bd3eb9a3e4c83c5e97ee883ab7a3dea27948d427056646ce79be823b4 |