Skip to main content

An ready to use exposer from services oriented code

Project description

Grui

Generated Rest User Interface

This package allow developer to expose function to the web. GRUI will generate a Rest API from the class. An HTTP page will also be generated. The main idea is to focus the code on the functionality.

Code examples

from typing import *

from grui import AbstractGruiService
from grui.decorator import *

class MySuperService(AbstractGruiService):
    """The documentation will be available to end user.

    Longer description will be display into the help page of the service.
    """

    @Get("my-super-path")
    @NotFoundIfEmpty  # Set the http return code to 404 if it return None. 
    def get_all(self) -> Optional[List[int]]:
        """The method documentation is display to the user as well"""
        return self.whatever

Issues/Bug report or improvement ideas

https://gitlab.com/olive007/grui/-/issues

License

GNU Lesser General Public License v3 or later (LGPLv3+)

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

grui-0.0.5.tar.gz (13.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page