Zaraciccio's Library for Python
Project description
Zaraciccio's Library for Python
Installation
pip install Zaraciccio
Components
The SQL Module helps you to connect to a SQLite, MySQL or PostgreSQL database.
To initialize it:
from Zaraciccio import SQL
# SQLite
db = SQL("sqlite:///database.db")
# MySQL
db = SQL("mysql://mysql@localhost/database")
# PostgreSQL
db = SQL("postgresql://postgresql@localhost/database")
The input module contains three functions:
input_int(prompt), via wich you can prompt the user for an integer. If the user doesn't input an integer, is prompted to retry.input_float(prompt), via wich you can prompt the user for a floating point value. If the user doesn't input a floating point value, is prompted to retryinput_string(prompt), via wich you can prompt the user for a string.
The printer module prints emphatised text.
An automatic \n is added at the end of every row. Is possible to pass many arguments, wich will be printed separaed by a space.
To initialize it:
from Zaraciccio import printer
p = printer(text="black", style="italic", background="white")
p.print("Foo", "Bar", "Baz")
The locales module formats values as an user-specified locale
from Zaraciccio import usd, eur, ?, locale
value = "1234.123"
precision = 3
l = locale(value, precision=precision)
print(usd(value, precision=precision))
print(eur(value, precision=precision))
print(gbp(value, precision=precision))
print(l.toUSD())
print(l.toEUR())
print(l.toGBP())
Development
Set up a Python virtual environment.
On Linux/MacOS:
python -m venv venv
source ./venv/bin/activate
On Windows:
py -3 -m venv venv
.\venv\Scripts\activate
Install required packages
pip install logging termcolor functools flask sqlalchemy sqlparse datetime
Please read the LICENSE file before using this software.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Zaraciccio-0.1.1.tar.gz
(9.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Zaraciccio-0.1.1.tar.gz.
File metadata
- Download URL: Zaraciccio-0.1.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
532988d9c228c8ec6e9bbae1f3bb044e4389190128613ee95662e38257d75c12
|
|
| MD5 |
bc69a0c7e96d3843231566410d065192
|
|
| BLAKE2b-256 |
e0763576910fb1e26b02f7e11b8c37dd7f3c0aa061f5b9f960c44a6ef42a6d60
|
File details
Details for the file Zaraciccio-0.1.1-py3-none-any.whl.
File metadata
- Download URL: Zaraciccio-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a33458ec02ccb7ff693933d83b63961d4bd3757cb5a0010813825ddba5a2acfe
|
|
| MD5 |
52c8efe4407bd24b918f0fb1c09296f6
|
|
| BLAKE2b-256 |
18f04cbb340a1b86e8b2171721c3742e7a56110777c6928d16efc8eafeb0e845
|