Skip to content

Winay-Chowdary66/servc-lib-python

 
 

Repository files navigation

servc-python

Serv-C implmentation for Python. Documentation can be found here

PyPI version Serv-C Serv-C Compliancy PyPI - Downloads Docker Pulls

Example

Here is the most simple example of use, starting a server to handle requests at the route my-route;

from typing import Any

from servc.server import start_server
from servc.svc.com.worker.types import RESOLVER_CONTEXT, RESOLVER_RETURN_TYPE

def inputProcessor(
  messageId: str,
  payload: Any,
  context: RESOLVER_CONTEXT,
) -> RESOLVER_RETURN_TYPE:
  return True

# the method 'methodA' will be resolved by inputProcessor
start_server(
  resolver={
    "methodA": inputProcessor
  }
)

About

Server implmentation of services for python

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 99.3%
  • Dockerfile 0.7%