smModule
Collection of methods and classes that are very useful and save a lot of time
Please report any errors to pascalvallaster@gmail.com
Installation
``` pip install smModule ```Description
This module contains several sections, for example the Logging - Section for writing logs or the DB and SQL - Section. Every class and method has its own doc-string containing information about usage, examples, exceptions... . You can see the doc-string by hover over the element with your mouse in the editor (eg. PyCharm) or by typing following python command:
help(sm.<element>)
Usage
For example we would like to execute a SQL-Query in my DB-File:
from sm import dbworker
class db(dbworker):
db_path = "/home/user1234/testDB.db"
result = []
def run_sql(self, sqlcom="SELECT Title FROM Books"):
self.c.execute(sqlcom)
self.connection.commit()
for row in self.c.fetchall():
self.result.append(str(row))
db_instance = db()
db_instance.run_sql()
for element in db_instance.result:
print(element)
db_instance.close()
License
Copyright by Pascal Vallaster | all rights reserved, OSI Approved; MIT-License
Development
Help and fixes welcome!
Tested on the following python versions: 3.6, 3.7, 3.8, 3.9
Tested on the following OS-Systems: Windows 10, Kali Linux, Ubuntu
Release files for smModule 9.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smModule-9.1.1.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smModule-9.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / smModule-9.1.1.tar.gz
| Download URL | smModule-9.1.1.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bf93cb885887201f8610e9699f71b9cdd8a41b981ac4cfd88bdf54d26756080
|
|
BLAKE2b-256 checksum How to use checksums |
9976bb7f855851a3354f7e302b69d716ebcef164f0f0fe135572eb5451e202fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / smModule-9.1.1-py3-none-any.whl
| Download URL | smModule-9.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
116f2fda7ed9f7f246a03da377a9699c38c0ea61fc36bbcfa317aa1564951317
|
|
BLAKE2b-256 checksum How to use checksums |
68761cbe072906edc5262aa4a0a9b2167b3faf414bb4c4e91134ad502a63b896
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|