Skip to main content

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


Download files

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

Source Distribution

pyrdms-0.2.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

pyrdms-0.2.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file pyrdms-0.2.0.tar.gz.

File metadata

  • Download URL: pyrdms-0.2.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/24.6.0

File hashes

Hashes for pyrdms-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6b09ff7b6b6a30dfba851fdb7d30defc67bf5a4a4ec7587770a9d56855ee8042
MD5 2cf50728a1cfc0e2373f480137c0c338
BLAKE2b-256 4f9452e7f34645293e2fbc819664537e321ec31ee3f5f77c8bf6c2d790749e24

See more details on using hashes here.

File details

Details for the file pyrdms-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyrdms-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/24.6.0

File hashes

Hashes for pyrdms-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 983e13fb3afddfda9a08be5cad1e33283f0f7ae11c33f4d6532520faaab177f0
MD5 2bee31b4b4efdd638b7786333db30719
BLAKE2b-256 4854141d8d14563534e471deafd99164bd07e8e7e01669ef3a262d3aba7b8a79

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