Python remote domain model server for d0sl core
Project description
Python D0SL RDM server
Python remote domain model server
Example usage
Without decorating: (some_method will be exposed as method of "domain model" NonDecoratedClass)
from pyrdms import predicate, serve
class NonDecoratedDSL:
def __init__(self):
pass
def a_plus_b_plus_c_plus_d(self, a: int, b: int, c: int, d: int) -> int:
return a + b + c + d
serve(50051, NonDecoratedDSL=NonDecoratedDSL())
With decorators: (some_method will be exposed as method of "domain model" NonDecoratedClass, some_other_method - will NOT be exposed)
from pyrdms import predicate, serve
class DecoratedClass:
def __init__(self):
pass
@predicate
def some_method(self, a: int, b: bool, c: str, d: list) -> bool:
return True
def some_other_method(self, a: int, b: bool, c: str, d: list) -> bool:
return True
serve(50051, DecoratedClass=DecoratedClass())
Use as client
Call predicate start in model SomeModel:
python3 -m pyrdms -a localhost -c --call SomeModel.start:
Call function start in model SomeModel:
python3 -m pyrdms -a localhost -c --call SomeModel.start:
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
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 pyrdms-0.1.2.tar.gz.
File metadata
- Download URL: pyrdms-0.1.2.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06b519b018bb995e84ebfb7188b8dc8ba73a7c6ca0c459875b360bda96f2b75c
|
|
| MD5 |
f3622fee515172a8dfa8612309ecd1eb
|
|
| BLAKE2b-256 |
625ae353c38a282717169980d7f62aed7d1ac22a78e23f5a39c64b834fc11f84
|
File details
Details for the file pyrdms-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyrdms-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd4aadef33b9277a6398a2eb18f1925e9d2c2568fa6e0d9dc1eff633751335d
|
|
| MD5 |
28986663379db954fc96e4d2a1f73507
|
|
| BLAKE2b-256 |
863a2d62e05b49563b5fe2dec3fafc58765d72a81adc9e64299629fa5441c0c7
|