Skip to main content

SM: contains a wide range of useful pythons things, for instance: SQL/XML/JSON - engine,math-functions, Log-writer, Terminal-Animations and CopyPast-Section.

Project description

##SM - Module for Python programing language >= 3.6: ###Please report any errors to pascalvallaster@gmail.com

###General Stuff:

####def quit()

  • Exits the current (main-)thread

####def clear()

  • Clears the terminal

####def sleep(sec)

  • Sleeps a certain time= sec: int
from sm import sleep
some_function_and_stuff()
sleep(5)
print("This program waited for 5 secounds")

####def check_input_int()

  • Checks if the entry from the user was an integer

###Math Stuff:

####def fracture(

  • Calculates a fracture; param p(bool) if for printing the result => True/False;
  • If division-zero error is raised it

####def check_int(nZ)

  • Checks if the param nZ is an int; param p(bool) if for printing the number => True/False;
  • Returns a bool

####def N(nZ)

  • Checks if param nZ is a natural number; param p(bool) if for printing the number => True/False;
  • Returns a bool

####def Nu(nZ)

  • Checks if param nZ is part of the uneven numbers; param p(bool) if for printing the number => True/False;
  • Returns a bool

####def Ne(nZ)

  • Checks if param nZ is part of even numbers; param p(bool) if for printing the result => True/False;
  • Returns a bool

####def P(nZ)

  • Checks if param nZ is part of the prime numbers; param p(bool) if for printing the result => True/False;
  • Returns a bool

###Hacking Stuff (aircrack-ng):

####def attack(bssid, interf)

  • Attacks the wifi with the given bssid and interf; can only be used with the program aircrack-ng or similar one that accepts the same commands; ######--legal-disclaimer--
  • Only use this function for good purposes - I am not responsible for any damage that could happen if the function was executed!

###DB Stuff:

####class IncorrectEntry(Exception)

  • Exception class in case the entry from some params is invalid; is raised by def check_vars()
from sm import dbworker
class db(dbworker):
    def __init__(self):
        super(db, self).__init__()
        
instance = db()
instance.INSERT(table:"table1", column:"column1")

-Execute Python-Script-
...
Incorrect entry for variable: value
Got 'NONE' instead  # Because 'value' must have a value, but it hasn't one => ERROR
    

####class dbworker

=> def INSERT()
=> def SELECT_ELEMETs()
=> def SELECT_ALL()
=> def  DELETE()
=> def UPDATE()
=> def getLastEntry()
  • See doc from dbworker itself, and the single functions in class dbworker.< function >();
  • It's recommended to close the connection to the db before closing down the application => dbworker.close()

###XML Stuff:

####class XMLworker

=> def overwrite()
=> insert_element
  • See doc from XMLworker itself, and the single functions in class XMLworker.< function >();

###JSON Stuff:

####class JSONworker

=> def write()
  • See doc from XMLworker itself, and the single functions in class JSONworker.< function >();

####Mail Stuff:

  • No doc

###Log Stuff:

####class logMaker

  • writes a log in a file with function writeLog()

###Color Stuff:

####class colors

=> RED = Fore.RED
=> BLUE = Fore.BLUE
=> CYAN = Fore.CYAN
=> WHITE = Fore.WHITE
=> BLACK = Fore.BLACK
=> GREEN = Fore.GREEN
=> YELLOW = Fore.YELLOW
=> MAGENTA = Fore.MAGENTA

=> RESET = Fore.RESET
=> BRIGHT = Style.BRIGHT
=> NORMAL = Style.NORMAL
  • See doc from package colorama itself

####Animations:

####def point_animation()

  • To animate three points "..." (loading symbol)

####def stick_animation()

  • To animate a rotating stick (loading symbol)

###Copy-Paste Code:

  • No Doc

###Main Stuff:

####main()

  • For handling the sys args if module is started with these

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

smModule-8.0.4.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smModule-8.0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file smModule-8.0.4.tar.gz.

File metadata

  • Download URL: smModule-8.0.4.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for smModule-8.0.4.tar.gz
Algorithm Hash digest
SHA256 4cabf88e131d79e974038eb2416643fef5150b01cd76a0bae842e09f489e0594
MD5 50f696d020d67deedccaa6e9ded64fb9
BLAKE2b-256 98d16da9fdf4d1386ec19ee05030f3d04c94b7ba3e89e93f904581e18412598e

See more details on using hashes here.

File details

Details for the file smModule-8.0.4-py3-none-any.whl.

File metadata

  • Download URL: smModule-8.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for smModule-8.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5898e6d0f8676948eebcf33609098ebf3d9b25b6fbc9bad569bf2764f007bda4
MD5 9013235b38137a0a19c9cb5848a60a2c
BLAKE2b-256 e92bdce8952d452246687f3c79254161fffc01864b7b4d80a5d66da31bfd79b5

See more details on using hashes here.

Supported by

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