Skip to main content

Coverage Status CodeQL

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 from src to dest. src and dest must 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) ensures mapping has a key of the same type a default. If key is not in mapping, store default to mapping under it.
  • ensure_no_key(mapping, key) ensures key is not present in mapping.
  • flatten(obj) flattens obj recursively if it is list or tuple.

Metadata

Release files for vutils-python 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vutils-python 0.2.1
File Size Uploaded
vutils-python-0.2.1.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vutils-python 0.2.1
File Interpreter ABI Platform
vutils_python-0.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 13.2 kB

Release files / vutils-python-0.2.1.tar.gz

Download URL vutils-python-0.2.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9a847cb4a93a453c36c26798e9e9f1fdfcf963b617b109dd79aa0cda7c92a2ce
BLAKE2b-256 checksum
How to use checksums
4a2e90725233f98fa8d8c9aef381100c811772e0777c5fecb5391c5e6dde7caa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / vutils_python-0.2.1-py2.py3-none-any.whl

Download URL vutils_python-0.2.1-py2.py3-none-any.whl
Size 5.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6beac9a71fd9e8962f738ddc8e64a697ad693c4953c6d44063d7e7fa948515ea
BLAKE2b-256 checksum
How to use checksums
ec9a89969640af5ae85d1061fb96c9d7fa1fff5403dc9d1a5a3db646c2c1c03f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page