'potato_util' is collection of simple useful utils package for python.
Project description
Potato Utils (Python Utils)
'potato_util' is collection of simple useful utils package for python.
✨ Features
- Python utilities
- Datetime utilities
- File I/O utilities
- HTTP utilities
- Security utilities
- Sanitation utilities
- Validation utilities
🛠 Installation
1. 🚧 Prerequisites
- Install Python (>= v3.10) and pip (>= 23):
- [RECOMMENDED] Miniconda (v3)
- [arm64/aarch64] Miniforge (v3)
- [Python virutal environment] venv
[OPTIONAL] For DEVELOPMENT environment:
- Install git
- Setup an SSH key (video tutorial)
2. 📥 Download or clone the repository
[TIP] Skip this step, if you're going to install the package directly from PyPi or GitHub repository.
2.1. Prepare projects directory (if not exists):
# Create projects directory:
mkdir -pv ~/workspaces/projects
# Enter into projects directory:
cd ~/workspaces/projects
2.2. Follow one of the below options [A], [B] or [C]:
OPTION A. Clone the repository:
git clone https://github.com/bybatkhuu/module.python-utils.git && \
cd module.python-utils
OPTION B. Clone the repository (for DEVELOPMENT: git + ssh key):
git clone git@github.com:bybatkhuu/module.python-utils.git && \
cd module.python-utils
OPTION C. Download source code:
- Download archived zip file from releases.
- Extract it into the projects directory.
3. 📦 Install the package
[NOTE] Choose one of the following methods to install the package [A ~ F]:
OPTION A. [RECOMMENDED] Install from PyPi:
pip install -U potato-util
OPTION B. Install latest version directly from GitHub repository:
pip install git+https://github.com/bybatkhuu/module.python-utils.git
OPTION C. Install from the downloaded source code:
# Install directly from the source code:
pip install .
# Or install with editable mode:
pip install -e .
OPTION D. Install for DEVELOPMENT environment:
pip install -e .[dev]
OPTION E. Install from pre-built release files:
- Download
.whlor.tar.gzfile from releases - Install with pip:
# Install from .whl file:
pip install ./potato_util-[VERSION]-py3-none-any.whl
# Or install from .tar.gz file:
pip install ./potato_util-[VERSION].tar.gz
OPTION F. Copy the module into the project directory (for testing):
# Install python dependencies:
pip install -r ./requirements.txt
# Copy the module source code into the project:
cp -r ./src/potato_util [PROJECT_DIR]
# For example:
cp -r ./src/potato_util /some/path/project/
🚸 Usage/Examples
Simple
</code></pre>
<p>👍</p>
<hr />
<h3>🌎 Environment Variables</h3>
<p><a href="./.env.example"><strong><code>.env.example</code></strong></a>:</p>
<pre lang="sh"><code># ENV=LOCAL
# DEBUG=false
# TZ=UTC
🧪 Running Tests
To run tests, run the following command:
# Install python test dependencies:
pip install .[test]
# Run tests:
python -m pytest -sv -o log_cli=true
# Or use the test script:
./scripts/test.sh -l -v -c
🏗️ Build Package
To build the python package, run the following command:
# Install python build dependencies:
pip install -r ./requirements/requirements.build.txt
# Build python package:
python -m build
# Or use the build script:
./scripts/build.sh
📝 Generate Docs
To build the documentation, run the following command:
# Install python documentation dependencies:
pip install -r ./requirements/requirements.docs.txt
# Serve documentation locally (for development):
mkdocs serve -a 0.0.0.0:8000
# Or use the docs script:
./scripts/docs.sh
# Or build documentation:
mkdocs build
# Or use the docs script:
./scripts/docs.sh -b
📚 Documentation
📑 References
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
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 potato_util-0.0.2.tar.gz.
File metadata
- Download URL: potato_util-0.0.2.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78a49ffaa1c6521283663fa8c3350efd41634a4a12172c0fd984ff30531de2bd
|
|
| MD5 |
c6e1197839ae9170bf7463bd835ea992
|
|
| BLAKE2b-256 |
00602e612999b81491813b821b2b4d113d721c0f3800d0ec64a17ba9a0cf51a0
|
File details
Details for the file potato_util-0.0.2-py3-none-any.whl.
File metadata
- Download URL: potato_util-0.0.2-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a7fe10cefbdc1c16f0a028eb5d30c8d54fa5815061560836896592f2a7b2ac5
|
|
| MD5 |
1e90ee68b403b266396a17c7e80d6985
|
|
| BLAKE2b-256 |
3f0effbf2d1f8e88307a601b8476a8ff7a5aa64eabba9985fbc2fb1ffe922af6
|