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
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
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swodl_interpreter-1.0.1-py3-none-any.whl.
File metadata
- Download URL: swodl_interpreter-1.0.1-py3-none-any.whl
- Upload date:
- Size: 50.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b748864027886c7bed30660f8167e3b908c31bb806bfe5f611bb7f712791874b
|
|
| MD5 |
077687421f895c703a337733e92e22d1
|
|
| BLAKE2b-256 |
3656f3c8a033723ab5080de9dcd06feffede2eb40e36bb48f41656a321839437
|