Skip to content

formerzayed/mandatum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mandatum

Mandatum is a python framework based on rich-python to create beatiful Command-Line-Interface applications in no time. It can create interface for your application in an object oriented approach. Visit on PyPi

Installation

To install via pip type the following command

pip install mandatum

OR

Install poetry

pip install poetry

Clone this repo

git clone https://github.com/ZayedMalick/mandatum

Change directory to mandatum and type

poetry install

Getting Started

Lets create a basic application with mandatum

import mandatum

# display
display = mandatum.Display()

# print
display.print(text="Hello World!", style="bold red", justify="center")

The above application was a very simple one , now lets make a bit complicated application

import mandatum

# Initial setup
menu = mandatum.Menu(options=["Opt1", "Opt2"], bold_text=True)
prompt = mandatum.Prompt(color="blue")
alert = mandatum.Alert(bold_text=True)
warning = mandatum.Warning()
display = mandatum.Display()


if __name__ == "__main__":

    # Displaying Menu
    menu.start()

    # User name
    name = prompt.input("\nEnter your name : ")
    display.print(text=name, style="bold green", justify="left")

    # Alerts
    alert.alert("\nAlerting")

    # Warning
    warning.warn(message="\nWarning!", bold_text=True)

Projects made with mandatum

License

mandatum is licensed under the terms of MIT license

Important Note

I am making mandatum more of a CLI Framework rather than a CLI styling framework so 2.0.0 will have the support of handling arguments etc.

About

A python framework to make cli applications

Topics

Resources

License

Stars

Watchers

Forks

Languages