Skip to main content

A New Born Python Micro Framework

Project description

Pysha

Pysha Micro Framework. For Doing Something Beautiful In Python :)

Because Currently This Micro Framework Is In Progress, I Will Some Helps Later.

Installation

Just Run This Command :

pip install pysha

Usage

Add This At First Of Your Code :

from pysha import *

Examples

  • Switch-Case
Switch(var).cases({
    Case(5):
        lambda: (
            print("Number Wasnt 5.") ,
            print(2)
        ),
    Case(10):
        lambda: (
            print("Number Was 10 !") ,
            print(3)
        ),
    Case(15):
        lambda: (
            print("Number Wasnt 15.") ,
            print(4)
        ),
    Case(20):
        lambda: (
            print("Number Wasnt 20.") ,
            print(5)
        ),
    Default:
        lambda:(
            print("Finish")
        )
})
  • Multi-Layer Ecnryption/Decryption
variable = make_enc(alg=[Algorithms.XOR,Algorithms.Base64],key=10)
variable.enc("Hello")
variable.dec("Qm9mZmU=")
  • Colored User-Input
name = colorprompt(colorize("(Fore.GREEN)[Enter Your Name :] "),char_color=fore["cyan"])
password = passprompt(colorize("(Fore.GREEN)[Enter Your Password :] "),mask_color=fore["cyan"])
pp(name)
  • Save And Load Variables With Encryption
# Save 2 Variables
Save("test.txt",name="Arshia",age=19)()

# Load Those 2 Variables
import sys
this = sys.modules[__name__]

Load("test.txt")(this)

**After Load Variables, They Are Accessable In Your Code ! **

And Lots Of Beautiful Things :)

You Can Look At Full Wiki To See More :)

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

pysha-0.0.2.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

pysha-0.0.2-py3-none-any.whl (29.4 kB view hashes)

Uploaded Python 3

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