Villog is a simple python utility tool for your everyday projects.
Can be installed with pip.
# Install UnixODBC with Brew
brew install unixodbc
# Install PyODBC
pip install --no-binary :all: pyodbc
Modules
- Logger
- Excel generator
- Excel reader
- MSSQL handler
- PDF generator
- Mail sender
Logger
from villog.log import Logger
l: Logger = Logger(file_path = "example.log")
l.log(content = "example_content")
Write Excel
from villog.writexcel import WorkSheet, WorkBook
sheet_1: WorkSheet = WorkSheet(name = "Sheet1",
header = ["header_1", "header_2", "header_3"],
data = [["data_1", "data_2", "data_3"],
["data_4", "data_5", "data_6"]])
sheet_2: WorkSheet = WorkSheet(name = "Sheet2",
header = ["header_1", "header_2", "header_3"],
data = [["data_1", "data_2", "data_3"],
["data_4", "data_5", "data_6"]])
book: WorkBook = WorkBook(name = "Book1",
sheets = [sheet_1, sheet_2])
book.xlsx_create(file_path = "example.xlsx")
Read Excel
from villog.readexcel import ReadExcel
excel: ReadExcel = ReadExcel(path = "example.xlsx")
excel.read()
for sheet_name in read_excel.get_sheet_names():
for row in excel.get_sheet_content_to_list(sheet_name):
for elem in row:
print(elem, end = "\t")
VillSQL
from villog.mssql import SQLConfig, VillSQL, Table
sql_config: SQLConfig = SQLConfig(server = "server_name",
database = "database_name",
username = "user_name",
password = "password")
sql_client: VillSQL = VillSQL(sql_config = sql_config)
egt: Table = sql_client.get_table("EXAMPLE_TABLE",
raw_filter="col_1 = "example",
order_by = ["col_1","ASC",
"col_3","DESC"],
# kwargs:
COL_4 = 1)
egt.set_filter(column_names = ["col_1, "col_2"])
print("COLUMNS:")
for column in egt.columns():
print(column, end = "\t")
print("\nROWS:)
for row in egt.rows:
for elem in row:
print(elem, end = "\t")
"""
Output:
COLUMNS:
col_1 col_2
ROWS:
val_1_1 val_1_2
val_2_1 val_2_2
val_3_1 val_3_2
"""
villsql_client.close()
PDF generator
from villog.pdf import generate as generate_pdf
generate_pdf(html_string = "html_string",
output_path = "example.pdf",
css_string = "css_string")
Mail man
from villog.mail_man import MailMan
mail: MailMan = MailMan(
smtp_server="smtp.example.com",
smtp_login="example@example.com",
smtp_port=465,
smtp_password="example_password",
name="Example Name"
)
mail.send(
subject = "Example subject",
body = "Example body",
send_to = ["example_1@example.com", "example_2@example.com"],
files = ["example.xlsx"],
images = None
)
Metadata
Release files for villog 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| villog-0.4.0.tar.gz | 27.5 kB | Without provenance | Details for villog-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| villog-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for villog-0.4.0-py3-none-any.whl |
Total release size: 55.3 kB
Release files / villog-0.4.0.tar.gz
| Download URL | villog-0.4.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12d5a7f8d78dc3d09f7f0fb5cbb8bfaf61b27de7c5bfedfad03854f797881466
|
|
BLAKE2b-256 checksum How to use checksums |
fb9fd8d84d0c773fac75c3b9234604df4dce2bd4f3607f915c6760796aa5c572
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / villog-0.4.0-py3-none-any.whl
| Download URL | villog-0.4.0-py3-none-any.whl |
|---|---|
| Size | 27.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5064c9dc63d942491a3c76d4bc1f81f89c86e474e7f7735302201ac088afb45e
|
|
BLAKE2b-256 checksum How to use checksums |
47903d2428e8c8a35664c5af82c84818d94cec1147f64e85cec498d5e0c33c57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for villog 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.