Handy Tools for Developers
Project description
Package wizzi utils:
Installation:
pip install wizzi_utils
Usage
import wizzi_utils as wu # imports all that is available
print(wu.__version__)
wu.test_all_modules() # run all tests in all 8 modules
- The above import will give you access to all functions and tests in wizzi_utils.
- For convenience, the wizzi_utils imports all it can from the sub modules, therefore only the one import above is enough.
- Every function is covered by a test(usually the 'func_name'_test()). Use this to see how the function works and also to copy paste the signature.
from wizzi_utils import algorithms as algs
from wizzi_utils import coreset as cot
from wizzi_utils import json as jt
from wizzi_utils import open_cv as cvt
from wizzi_utils import pyplot as pyplt
from wizzi_utils import socket as st
from wizzi_utils import torch as tt
misc_tools & misc_tools_test
'pip install wizzi_utils' made sure you'll have everything needed installed so they should be fully working,
so there is no namespace for misc_tools module(direct access from wu)
import wizzi_utils as wu
# all functions in misc_tools & misc_tools_test are imported to wizzi_utils
print(wu.to_str(var=2, title='my_int')) # notice only wu namespace
# direct access to the misc_tools module
print(wu.misc_tools.to_str(var=2, title='my_int')) # not needed but possible
wu.test.test_all() # runs all tests in misc_tools_test.py
wu.test.to_str_test() # runs only to_str_test
All other modules(7 so far)
Other modules, e.g. torch_tools, will work only if you have all the dependencies written in the init file of the module.
- In torch_tools example, the dependencies are written here:
wizzi_utils.torch.__init__.py # for the tools
wizzi_utils.torch.test.__init__.py # for the tests and examples
import wizzi_utils as wu
# if we want torch tools: we need torch, torchvision
# access to a function in the torch module
print(wu.tt.to_str(var=3, title='my_int')) # notice wu and tt namespaces. tt for torch tools
# access to a function in the matplotlib module - same rules as torch example above
print(wu.pyplt.get_RGB_color(color_str='r'))
# access to a module test
wu.algs.test.test_all() # all tests in algorithm module
wu.pyplt.test.plot_3d_iterative_dashboard_test() # specific test in algorithm module
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
wizzi_utils-6.2.3.tar.gz
(48.9 kB
view details)
File details
Details for the file wizzi_utils-6.2.3.tar.gz
.
File metadata
- Download URL: wizzi_utils-6.2.3.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4474729f3b15b8ae7289ecaedb93fb47b5c6ae8c2b2b335f7d22ec9807cacd9 |
|
MD5 | e8bae5cdd1ee23b4de7eeb0bb1a55df0 |
|
BLAKE2b-256 | 8cebdb05af6751f62e8a41f22c17bb3a9aa9ffd20bfb195e9c03bbcdb3645fe7 |