Exemple #1
0
 def __init__(self):
     hug.cli()(self.hello_world_method)
Exemple #2
0
 def __init__(self):
     hug.cli()(self.hello_world_method)
Exemple #3
0
        print(
            "SUCCESS: Good work! Project's cruft is up to date and as clean as possible :)."
        )


def _update_output(updated: bool) -> None:
    if not updated:
        print("")
        print("Nothing to do, project's cruft is already up to date!")
    else:
        print("")
        print(
            "Good work! Project's cruft has been updated and is as clean as possible!"
        )


def _link_output(linked: bool) -> None:
    if linked:
        print("")
        print("Project successfully linked to template!")
    else:
        print("")
        print("Project linking failed :(")


cli = hug.cli(api=hug_api)
cli(api.create)
cli.output(_update_output)(api.update)
cli.output(_check_command_output)(api.check)
cli.output(_link_output)(api.link)
Exemple #4
0
import hug

from pdocs import api, logo

cli = hug.cli(api=hug.API(__name__, doc=logo.ascii_art))
cli(api.as_html)
cli(api.as_markdown)
cli(api.server)
 def decorator(f):
     return hug.get(output=output)(hug.cli(output=output)(func))