Skip to main content

SWoDL interpreter.

Project description

swodl_interpreter

SWoDL interpreter that is written following the next documentation: http://resources.avid.com/SupportFiles/attach/AssetManagement/References/AssetManagement_2019_6_SWoDLReference.pdf

and

https://resources.avid.com/SupportFiles/attach/AssetManagement/References/AssetManagement_2020_9_ProcessReference.pdf

Try it in browser

https://vladku.gitlab.io/swodl_interpreter/

How to run:

Install:

pip install git+https://gitlab.com/vladku/swodl_interpreter.git

Run:

swodl run <filepath>

or use swodl --help to get all params)

Example how to pass struct as input: swodl -in "t={'r': [1, 5, 6]}"

What to add:

  • Input var from file []
  • Error handling (line number) [+-]
  • Fix str repr for nested out

How to write web services resolver plugin:

Create your Resolver class with get_service, get_method and get_config methods like:

class WebFake:
    def get_service(self, service, interface):
        return self
    def get_method(self, name):
        def web(*args, **kwargs):
            return f"{name}".join(args)
        return web
    def get_config(self, profileName, keys, default=""):
        ...
    def get_wf(self, name):
        ...

Create your own package with following part of setup.py

setuptools.setup(
    ...
    entry_points = {
        'swodl_service_resolvers': [
            '{your_plugin_name} = {packagename}.{modulename}:{classname}',
        ],
    },

)

Mock config example:

config = {
    "services": {
        "service_name": {
            "interface_name": {
                "method_name": {
                    "cases": [{
                        "args": [
                            "1"
                        ],
                        "result": "One"
                    }],
                    "default": 123
                }
            }
        }
    },
    "config": {
        "profile": {
            "section": {
                "section": {
                    "key": "CONFIGURATION!"
                }
            }
        }
    }
}

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swodl_interpreter-1.0.1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file swodl_interpreter-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for swodl_interpreter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b748864027886c7bed30660f8167e3b908c31bb806bfe5f611bb7f712791874b
MD5 077687421f895c703a337733e92e22d1
BLAKE2b-256 3656f3c8a033723ab5080de9dcd06feffede2eb40e36bb48f41656a321839437

See more details on using hashes here.

Supported by

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