Python language tools
Project description
vutils-python: Python Language Tools
This package provides a set of tools to deal with tasks related to Python language environment, like copying data to or from objects, importing, object analysis etc.
Installation
To get vutils-python, just type
$ pip install vutils-python
How To Use
Functions and classes provided by vutils-python can be accessed by importing
following submodules:
vutils.python.objects
Each of these submodules is described in the following subsections.
Objects Manipulation
Functions and classes that deals with Python objects, defined in
vutils.python.objects submodule, are
merge_data(dest, src)merges data fromsrctodest.srcanddestmust be of the same type. Examples:src = [1, 2, 3] dest = [1, 2] merge_data(dest, src) # dest will be [1, 2, 1, 2, 3] src = {1, 2, 3} dest = {2, 4} merge_data(dest, src) # dest will be {1, 2, 3, 4} src = {"a": "bc", 1: 2} dest = {1: "a", "b": "c"} merge_data(dest, src) # dest will be {1: 2, "a": "bc", "b": "c"} merge_data({}, [1]) # TypeError
ensure_key(mapping, key, default)ensuresmappinghas akeyof the same type adefault. Ifkeyis not inmapping, storedefaulttomappingunder it.ensure_no_key(mapping, key)ensureskeyis not present inmapping.flatten(obj)flattensobjrecursively if it islistortuple.
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 vutils-python-0.2.1.tar.gz.
File metadata
- Download URL: vutils-python-0.2.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a847cb4a93a453c36c26798e9e9f1fdfcf963b617b109dd79aa0cda7c92a2ce
|
|
| MD5 |
04849e8210e577dbe5be907e9ce1ea7a
|
|
| BLAKE2b-256 |
4a2e90725233f98fa8d8c9aef381100c811772e0777c5fecb5391c5e6dde7caa
|
File details
Details for the file vutils_python-0.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: vutils_python-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6beac9a71fd9e8962f738ddc8e64a697ad693c4953c6d44063d7e7fa948515ea
|
|
| MD5 |
38421a0c30d273f7fa60f858a464cc1a
|
|
| BLAKE2b-256 |
ec9a89969640af5ae85d1061fb96c9d7fa1fff5403dc9d1a5a3db646c2c1c03f
|