Skip to main content

Utilities helper library for Python

Project description

ve-utils

This is a Python utilities library helper. Contain methods shared by multiple repositories.

Installation

Install from PyPi :

You can install the ve_utils helper from PyPI:

python -m pip install ve_utils

Install from github repository :

Open Git bash or install it from here.

Go to the current directory where you want the cloned directory to be added.

cd ~/my-repo/

And clone the ve-utils repository :

git clone https://github.com/mano8/utils.git

Open new console and go to the current directory where you clone utils repository

cd ~/my-repo/utils

If you use python virtual environment egg anaconda, conda activate my_env

Now you can install the package via python command :

python setup.py install

How to use

First you need import one of the utils package egg :

from utils.utils import UType as U

Now, for example if you need to test if variable contain an non empty list you can use :

> my_var = [ 0, 1 ,2 ,3 ]
> U.is_list_not_empty(my_var)
> True
> my_var = 2
> U.is_list_not_empty(my_var)
> False 

The is_list_not_empty method is the same of using isinstance(my_var, list) and len(my_var) > 0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ve-utils-1.1.0.tar.gz (25.5 kB view hashes)

Uploaded Source

Built Distribution

ve_utils-1.1.0-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page