Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eoq3utils-2.9.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

eoq3utils-2.9.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file eoq3utils-2.9.1.tar.gz.

File metadata

  • Download URL: eoq3utils-2.9.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for eoq3utils-2.9.1.tar.gz
Algorithm Hash digest
SHA256 2f249cb7b40ccbfc49e71e9271fa9c932d57a19df922327a576031b5cea8331b
MD5 b9ef1580c8e82a5216d582fce8ebf532
BLAKE2b-256 e8ffcccbf056711d11a07e8ad98d28df4ebb756c8f34a51936037da1efd49e4a

See more details on using hashes here.

File details

Details for the file eoq3utils-2.9.1-py3-none-any.whl.

File metadata

  • Download URL: eoq3utils-2.9.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for eoq3utils-2.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df4e36cd4e197ee1ae828b3e1a08a27816bbd208dea1c17c6c3eae8a29d38e95
MD5 10e7e51fe1c62416a82fe629618731e4
BLAKE2b-256 156f1b07fffa7fa26f5cf170390bb82f63401aef9cc7116536ea822e0b7a2009

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page