A collection of Python function that I used in my projects.
Project description
Ziz's Utilities - Python Edition
A collection of Python function that I used in my projects.
Functionalities
Update 1.0.0
isInt(input: str) #Check if input of type str is an integer or not.
clear() #Clear the terminal.
num_to_roman(input: int) #Convert input of type int into the equivalent in Roman numerals.
menu(config: Container, start: int = 1, trailing_dot: bool = True, roman_numeral_mode: bool = False) #A menu generator, consult the docstring of this function for more information. This is the pre-3.0.0 version
Update 2.0.0
config_manager(def_config: dict, config_folder: str, config_file_name: str) #Consult the docstring of this function.
write_config(config_path: str, config: dict, def_config: dict) #Consult the docstring of this function.
Update 3.0.0
menu(config: Container,
option_prefix: str = "".strip(),
option_suffix: str = "".strip(),
start: int = 1,
trailing_dot: bool = True,
roman_numeral_mode: bool = False
) #A menu generator, consult the docstring of this function for more information. This is the 3.0.0 version
Update 4.0.0
validate_param(param: object, name: str, expected_type: type) #Check the type of param and throw an error if not match the expected_type.
Update 5.0.0
is_prime(input: int) #Check if input (of type int) is a prime number or not.
first_n_primes(n: int) #Generate the first n prime number(s).
Update 6.0.0
config_manager(def_config: dict, config_folder: str, config_file_name: str, compare_keys: bool = True) #Consult the docstring of this function.
write_config(config_path: str, config: dict, def_config: dict, compare_keys: bool = True) #Consult the docstring of this function.
And more! (hopefully)
Installation
- Install Python 3.x from here. (Ignore if you already have Python 3.x installed)
-
Open terminal, run:
pip install ziz_utils
Usage
In a Python file:
import ziz_utils
Or:
from ziz_utils import <function_name> #With function_name as the, well, function name.
Requirement(s)
- Python 3.x
License
This project is licensed under the GNU General Public License 3.0, check LICENSE for more details.
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
ziz_utils-6.0.0.tar.gz
(17.0 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
ziz_utils-6.0.0-py3-none-any.whl
(17.3 kB
view details)
File details
Details for the file ziz_utils-6.0.0.tar.gz.
File metadata
- Download URL: ziz_utils-6.0.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12e0f7ccc7db814d2d83aa1930acc7cb2a0de699a2324c5ef95c467650073b6f
|
|
| MD5 |
56eeda9ff180a891481ee7939d152043
|
|
| BLAKE2b-256 |
2a5345de227376e8b5f0199d6b5b68a88c25ea74898f478543f149264159be75
|
File details
Details for the file ziz_utils-6.0.0-py3-none-any.whl.
File metadata
- Download URL: ziz_utils-6.0.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
538a813db3ec0a718b63bfd9b971495368d996d88f982f4d2bc7f26293646855
|
|
| MD5 |
10ceccead1eb37d488fb038d0e550207
|
|
| BLAKE2b-256 |
81c6dc240e8a7f07c507fec4ea5a07b794c53db2f640418ba6e127659e4be4d7
|