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
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 Web Socket 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 Web Socket 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
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.0.tar.gz
.
File metadata
- Download URL: eoq3utils-2.9.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a32d196ac6b832b03bdb296850b4deac49442f8e5e2146076044287ffca6bad |
|
MD5 | a8ce3c9572f71d70d61adb99ef9a38d7 |
|
BLAKE2b-256 | 428e5153750a73f0698dbdcb18835ada25babb87b322d1c6d51b3c25e990c92b |
File details
Details for the file eoq3utils-2.9.0-py3-none-any.whl
.
File metadata
- Download URL: eoq3utils-2.9.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7097c4b165cda4d0056dd462957bc5e5497ebc926bcdbe95027980bd2c9038e5 |
|
MD5 | e629e906ca98cb02227f564b521f127d |
|
BLAKE2b-256 | 12818e3903969d5d695655a3abcecc0a6fd3a6d7d63c53559b6f96faf75908a5 |