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_uuidself-explanatory
Utils Image
Conversion between PIL and OpenCV formats. Opening, saving, downloading, encoding images.
convert_image_pil_to_image_cvconvert PIL image to OpenCV imageconvert_image_cv_to_image_pilconvert OpenCV image to PIL imageopen_image_pilload PIL image from fileopen_image_cvload OpenCV image from filesave_image_pilsave PIL image to filesave_image_cvsave OpenCV image to filedebug_image_cvshow a GUI window with an OpenCV image displayed in itdownload_image_pildownload PIL image from urlencode_image_pil_as_base64convert PIL image to base 64 encoded stringdecode_image_pil_from_base64convert base 64 encoded string to PIL image
Utils OpenCV
Various OpenCV tools you might commonly need
blur_gaussianapply Gaussian blurrotate_boundrotate image bounded, preserving the original dimensions and cutting all rotated content that doesn't fit into original image sizerotate_freerotate image freely, changing dimensions to make sure all rotated content fits insidedeskewdeskew (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_agentgenerate a random User-Agent for HTTP headers (using user_agent library)
UtilsPing
Special utils to generate ping replies. Useful in web services.
buildgenerate 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
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 tekleo-common-utils-0.0.2.8.tar.gz.
File metadata
- Download URL: tekleo-common-utils-0.0.2.8.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5b8893299d130044c741aa451d774b36a10ab66e22c6b0395af627cea0f1cbe
|
|
| MD5 |
351da9d102446b2a4b7c7757ebdac9ea
|
|
| BLAKE2b-256 |
60f15b3fa461f2d5ae6505cecf123a27f9e9ed851d6b85388a64448fe128c5eb
|
File details
Details for the file tekleo_common_utils-0.0.2.8-py3-none-any.whl.
File metadata
- Download URL: tekleo_common_utils-0.0.2.8-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8325d95b9a7d069785a19914f742a010dfa06e3a376395894540ddaad0b8c18
|
|
| MD5 |
372b324e35d8d68904a374d4356c9334
|
|
| BLAKE2b-256 |
057c22fee697f587267a5561baea7c979cdaa310cbf7aaa514028b1e6ccd7527
|