No project description provided
Project description
TekLeo Common Utils
A python package with shared utils methods that can be used in a variety of python projects, but are mostly tailored towards web / ml applications.
Feel free to drop your suggestions, hopefully one day this will be a pretty comprehensive library of cool shared tools.
Description
Under construction... This shit is boring to write, will finish description and examples when I have more free time.
Utils ID
generate_uuid
self-explanatory
Utils Image
Conversion between PIL and OpenCV formats. Opening, saving, downloading, encoding images.
convert_image_pil_to_image_cv
convert PIL image to OpenCV imageconvert_image_cv_to_image_pil
convert OpenCV image to PIL imageopen_image_pil
load PIL image from fileopen_image_cv
load OpenCV image from filesave_image_pil
save PIL image to filesave_image_cv
save OpenCV image to filedebug_image_cv
show a GUI window with an OpenCV image displayed in itdownload_image_pil
download PIL image from urlencode_image_pil_as_base64
convert PIL image to base 64 encoded stringdecode_image_pil_from_base64
convert base 64 encoded string to PIL image
Utils OpenCV
Various OpenCV tools you might commonly need
blur_gaussian
apply Gaussian blurrotate_bound
rotate image bounded, preserving the original dimensions and cutting all rotated content that doesn't fit into original image sizerotate_free
rotate image freely, changing dimensions to make sure all rotated content fits insidedeskew
deskew (straighten) image, works best on text images, like page scans and etc.
Utils Random
Random related stuff beyond the default random
module
get_random_user_agent
generate a random User-Agent for HTTP headers (using user_agent library)
UtilsPing
Special utils to generate ping replies. Useful in web services.
build
generate ping reply object
TODO / next updates
- Needs a lot of unit tests & usage examples
Installation
Normal installation
pip install tekleo-common-utils
Development installation
git clone https://github.com/jpleorx/tekleo-common-utils.git
cd tekleo-common-utils
pip install --editable .
Links
In case you’d like to check my other work or contact me:
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
Hashes for tekleo-common-utils-0.0.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38d8fa6efba4ebf8d7f61c67e06627128e91a2e8a17ca440ce2361057ebcb737 |
|
MD5 | 93b9051b8728d3aabbc996d18dd9ccbe |
|
BLAKE2b-256 | 88aad65b593d041c926c1d6c7c9b8d2e7298fc9d78da31ba25c1b8dc3454117f |
Hashes for tekleo_common_utils-0.0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c8167a83a29677d5c362ec188ebe129f903309ccccc4b0bc7cd844b6d794f05 |
|
MD5 | 18a15d57491945b02a83833feefb2ade |
|
BLAKE2b-256 | 2cb5f451f295f3b8c075702f25acf57aa4dd198be5b89e591214b233df9dcc50 |