Skip to content

Generic server class to handle common cases #8

@nthiery

Description

@nthiery

Currently the demo server file is quite lengthy. It would be nice to have a base class with good default configuration so that, in the easy cases, running an SCSCP server could boil down to something like:

from scscp.server import SCSCPServer
srv = SCSCPServer()
srv.register_service(cdbase='...', cd='arith1', name='power', action=lambda x,y: x**y)
srv.serve_forever()

If case we would have a reasonable default set of services (maybe just apply, assuming we have a way to represent a Python function in OpenMath (as we do with openmath.convert_pickle), this could even boil down to:

    python -m scscp.server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions