Skip to main content

Write Simple and Quick Python GUI Application

Project description

DEDICATION

=====================

"This project is dedicated to my sister who I wanted to someday thank for taking care of me when I was kid. Though you are no longer with us, you will never be forgotten. May your memory be forever held in this project."

-- Bridget Trinity Vedjesu --


Clera User's Manual

=====================

Clera provides platform for developing python GUI quickly and simply with low learning curve

THE BASICS

Installation

pip install clera

Your first application and Skeleton of every GUI developed using clera.

Code:

from clera import *

window = Window()

# window widgets and layouts goes here!

window.run()

Output:

Empty Window

" Why Complicate Simplicity? "

PLATFORMS

Hardware and OS Support

Clera runs on multiple platforms and have a native interface on each.

Hardware Support

  • Runs on Desktop and Laptops

OS Support

  • Windows

  • Mac

  • Linux



Widgets and Elements Reference

Button Widget


value = '',

func = None,

icon = None,

id = None,

disabled = False,

default = False,

grid = (None, None),

sizepolicy = (None, None),

checkable = False,

checked = False,

hidden = False,

focus = True


# Button(value, func, id)

def say_hi():

    print('Hi')



Button(value='Text', func=say_hi, id='btn')

| Type | Name | Meaning |

|-----------|------------|---------|

| any | value | define text displayed on button |

| function | func | function to be executed when button is clicked |

| str | icon | path to icon to be displayed on button |

| any | id | Widget id for representing and calling widget in other code parts and css |

| bool | disabled | set button disabled or unfunctional. Lacks interaction. default False |

| bool | default | ... |

| tuple | grid | Tuple (Horizontal, Vertical). set grid occupy position. works with the Grid() Element |

| tuple | sizepolicy | Tuple (Horizontal, Vertical). set widget stretch rule. Takes "fixed" for widget stay fixed on window size change. "expand" for widget to stretch in the direction of window size change |

| bool | checkable | set button checkeable, a state of selected and unselected with each button interaction. default False |

| bool | checked | set button slected default on application launch. default False |

| bool | hidden | ... |

| bool | focus | ... |



Input Widget


placeholder = None,

id = None,

value = None,

type = STANDARD,

diabled = False,

readonly = False,

maxlength = None,

hidden = False,

font = None,

fontsize = None,

text_changed = None,

return_pressed = None,

editing_finished = None,

text_edited = None,

selection_changed = None,

sizepolicy = (None, None),

grid = (None, None),


# Input(placeholder, id)

Input(placeholder='Enter Username', id='username')

| Type | Name | Meaning |

|-----------|------------|---------|

| any | placeholder | set placeholder text for the widget |

| any | id | Widget id for representing and calling widget in other code parts and css |

| any | value | sets default value of the input widget |

| str | type | set the input widget type. default STANDARD. TYPES : password, standard and noecho |

| bool | disabled | set input box disabled or uneditable. Lacks interaction, usually inactive. default False |

| bool | readonly | set input box to read only. visually active but value unchangeable. default False |

| int | maxlength | set maximm input value capacity |

| bool | hidden | hides input widget. default False |

| str | font | set font family of the input widget |

| int | fontsize | set the font size of the input widget |

| function | text_changed | ... |

| function | return_pressed | ... |

| function | editing_finished | ... |

| function | text_edited | ... |

| function | selection_changed | ... |

| tuple | sizepolicy | Tuple (Horizontal, Vertical). set widget stretch rule. Takes "fixed" for widget stay fixed on window size change. "expand" for widget to stretch in the direction of window size change. |

| tuple | grid | Tuple (Horizontal, Vertical). set grid occupy position. works with the Grid() Element. |



Text Widget


value = '',

id = None,

link = None,

hovered = None,

clicked = None,

buddy = None,

alignment = None,

wordwrap = False,

grid = (None, None),

sizepolicy = (None, None),

hidden = False


# Text(value, id)

Text(value='This is a text', id='first_line')

| Type | Name | Meaning |

|-----------|------------|---------|

| any | value | set text value |

| any | id | Widget id for representing and calling widget in other code parts and css |

| str | link | set hyperlink for widget. |

| function | hovered | fucntion to execute if widget is hovered or mouse pointer is moved over he widget |

| function | clicked | function to execute if widget is clicked |

| str | buddy | ... |

| str | alignment | sets alignment for text widget. ALIGNMENTS: Center, Justify, Right, Left, Top, Bottom, Hcenter, Vcenter |

| bool | wordwrap | contain word overflow in application window. default False. |

| tuple | grid | uple (Horizontal, Vertical). set grid occupy position. works with the Grid() Element. |

| tuple | sizepolicy | Tuple (Horizontal, Vertical). set widget stretch rule. Takes "fixed" for widget stay fixed on window size change. "expand" for widget to stretch in the direction of window size change. |

| bool | hidden | ... |


📝 Note: hovered and clicked only works if link is set.



Image Widget


source = None,

id = None,

size = None,

alignment = None,

grid = (None, None),

sizepolicy = (None, None),

hidden = False,


# Image(source, id)

Image(source='/image/new.png', id='logo')

| Type | Name | Meaning |

|-----------|------------|---------|

| str | source | path to image file. |

| any | id | Widget id for representing and calling widget in other code parts and css |

| int | size | ... |

| str | alignment | ... |

| tuple | grid | Tuple (Horizontal, Vertical). set grid occupy position. works with the Grid() Element. |

| tuple | sizepolicy | Tuple (Horizontal, Vertical). set widget stretch rule. Takes "fixed" for widget stay fixed on window size change. "expand" for widget to stretch in the direction of window size change. |

| bool | hidden | ... |



CheckBox Widget


label = '',

checked = bool,

id = None,

state_changed = None,

toggled = None,

grid = (None, None),

sizepolicy = (None, None),


# CheckBox(label, checked, id)

CheckBox(label='Windows', checked=True, id='win')

| Type | Name | Meaning |

|-----------|------------|---------|

| any | label | set checkbox label or text |

| bool | checked | set checkbox selected on first runs. default False |

| any | id | Widget id for representing and calling widget in other code parts and css |

| function | state_changed | fucntion to execute if checkbox state is changed. |

| function | toggled | function to execute when checkbox is toggled. checked / unchecked |

| tuple | grid | Tuple (Horizontal, Vertical). set grid occupy position. works with the Grid() Element. |

| tuple | sizepolicy | Tuple (Horizontal, Vertical). set widget stretch rule. Takes "fixed" for widget stay fixed on window size change. "expand" for widget to stretch in the direction of window size change. |



RadioButton Widget


label = '',

checked = bool,

id = None,

state_changed = None,

toggled = None,

grid = (None, None),

sizepolicy = (None, None),


# RadioButton(label, checked, id)

RadioButton(label='Windows', checked=True, id='win')

| Type | Name | Meaning |

|-----------|------------|---------|

| any | label | set radiobutton label or text |

| bool | checked | set radiobutton selected on first runs. default False |

| any | id | Widget id for representing and calling widget in other code parts and css |

| function | state_changed | fucntion to execute if radiobutton state is changed. |

| function | toggled | ... |

| tuple | grid | Tuple (Horizontal, Vertical). set grid occupy position. works with the Grid() Element. |

| tuple | sizepolicy | Tuple (Horizontal, Vertical). set widget stretch rule. Takes "fixed" for widget stay fixed on window size change. "expand" for widget to stretch in the direction of window size change. |



Textarea Widget


id = None,

placeholder = None,

hidden = None,

alignment = None,

value = None,

disabled = False,

readonly = False,

text_changed = None,

selection_changed = None,

undo_available = None,

redo_available = None,

maxlength = None,

font = None,

fontsize = None,

sizepolicy = (None, None),

grid = No(None, None)e,

tabwidth = None,



| Type | Name | Meaning |

|-----------|------------|---------|

| any | id | ... |

| any | placeholder | ... |

| bool | hidden | ... |

| str | alignment | ... |

| any | value | ... |

| bool | disabled | ... |

| bool | readonly | ... |

| function | text_changed | ... |

| function | selection_changed | ... |

| function | undo_available | ... |

| function | redo_available | ... |

| int | maxlength | ... |

| str | font | ... |

| int | fontsize | ... |

| tuple | sizepolicy | ... |

| tuple | grid | ... |

| int | tabwidth | ... |



ListWidget Widget


list_items = None,

id = None,

mode = None,

grid = (None, None),

sizepolicy = (None, None),

func = None,



| Type | Name | Meaning |

|-----------|------------|---------|

| any | list_items | ... |

| any | id | ... |

| str | mode | ... |

| tuple | grid | ... |

| tuple | sizepolicy | ... |

| function | func | ... |



Select Widget


option = None,

id = None,

placeholder = None,

grid = (None, None),

sizepolicy = (None, None),

current_text_changed = None,

activated = None,



| Type | Name | Meaning |

|-----------|------------|---------|

| any | option | ... |

| any | id | ... |

| any | placeholder | ... |

| tuple | grid | ... |

| tuple | sizepolicy | ... |

| function | current_text_changed | ... |

| function | activated | ... |

| ... | ... | ... |



ProgressBar Widget


id = None,

min = 0,

max = 0,

value = None,

orientation = horizontal,

grid = (None, None),

sizepolicy = (None, None),

text_visible = True,

inverted = False,

value_changed = None,



| Type | Name | Meaning |

|-----------|------------|---------|

| any | id | ... |

| int | min | ... |

| int | max | ... |

| int | value | ... |

| str | orientation | ... |

| tuple | grid | ... |

| tuple | sizepolicy | ... |

| bool | text_visible | ... |

| bool | inverted | ... |

| function | value_changed | ... |

| ... | ... | ... |



Slider Widget


id = None,

min = 0,

max = 0,

value = None,

step = None,

orientation = horizontal,

grid = (None, None),

sizepolicy = (None, None),

value_changed = None,



| Type | Name | Meaning |

|-----------|------------|---------|

| any | id | ... |

| int | min | ... |

| int | max | ... |

| int | value | ... |

| int | step | ... |

| str | orientation | ... |

| tuple | grid | ... |

| tuple | sizepolicy | ... |

| function | value_changed | ... |

| ... | ... | ... |



Dial Widget


id = None,

min = 0,

max = 0,

value = None,

tick_target = None,

tick = False,

wrapping = False,

grid = (None, None),

sizepolicy = (None, None),

value_changed = None,



| Type | Name | Meaning |

|-----------|------------|---------|

| any | id | ... |

| int | min | ... |

| int | max | ... |

| int | value | ... |

| any | tick_target | ... |

| bool | tick | ... |

| bool | wrapping | ... |

| tuple | grid | ... |

| tuple | sizepolicy | ... |

| function | value_changed | ... |

:- Change Log -:

======================

0.0.1 -- [ 11 APRIL 2023 ]

[ NOTICE ]

[ ❗ ] - Initial Release

0.0.2 -- [ 11 APRIL 2023 ]

[ NOTICE ]

[+] Module Install fixed

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

clera-0.0.6.tar.gz (409.0 kB view details)

Uploaded Source

Built Distribution

clera-0.0.6-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file clera-0.0.6.tar.gz.

File metadata

  • Download URL: clera-0.0.6.tar.gz
  • Upload date:
  • Size: 409.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for clera-0.0.6.tar.gz
Algorithm Hash digest
SHA256 398bf200883e0561487acfd038d4837513b398e3ed860cb7c96d9a105a87df4e
MD5 ad4739ef948eec247c926db8f952ba3e
BLAKE2b-256 f0b121da3570883e0fa6a2b5a9ebe4d70475667971c00b98baa21b1e11c58467

See more details on using hashes here.

File details

Details for the file clera-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: clera-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for clera-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 87c98c7095dc8c49cced7f9226016037c3baab64b5fb4b5b6008dddd585ecd40
MD5 ef346dbb2f8165d28b6d67c0cd7caf6c
BLAKE2b-256 5804f3783e03ea3b1393808c1831b1d41d117b6cf6f578e70987853b1fff887f

See more details on using hashes here.

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