Skip to main content

Utilities for Python

Project description

py-utls

Utilities for Python

PyPI GitHub tag (latest by date) GitHub last commit GitHub issues GitHub

py-utls is a small Python repository where I put all the useful stuff I regularly need in my projects. Feel free to use at your discretion with the appropriate license mentions.

NB: I've developed the same kind of libraries for both Go and TypeScript.

Usage

pip install py-utls

This repository contains the following modules:

  • hex:
    • from_hex: builds the byte array from a string;
    • to_hex: creates the hexadecimal representation of a byte array;
  • list:
    • flatten: transforms a list of list of items to a list of items.
from pyutls.hex import from_hex, to_hex
from pyutls.list import flatten

# Hex utilities
barray = from_hex('1234abcd')
hex_string = to_hex(barray)
assert(hex_string == '1234abcd')

# Flatten a list of list
flat_list = flatten(list1, list2)

Tests

$ python3 -m unittest discover

License

These modules are distributed under a MIT license.
See the LICENSE file.


© 2022 Cyril Dever. All rights reserved.

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

py-utls-0.1.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

py_utls-0.1.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file py-utls-0.1.3.tar.gz.

File metadata

  • Download URL: py-utls-0.1.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.10.2

File hashes

Hashes for py-utls-0.1.3.tar.gz
Algorithm Hash digest
SHA256 515c09f614f50e20b3d07f19e9dfd226293e6efe58b27a7e0fde766ce97ec395
MD5 ec770e42e20a0efaa1c6c53f6ff3712b
BLAKE2b-256 3a590eeff4f2f4cf6900533f8d1417b9191cc96d716716e491bdb97aae7e5082

See more details on using hashes here.

File details

Details for the file py_utls-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: py_utls-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.10.2

File hashes

Hashes for py_utls-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 86d560525fa9fe716a64ba66133fff0926b8605f32cb9ba00f0f7ea3d6a0dd66
MD5 bf343058db17c2ad94dc0dbaaf7ae325
BLAKE2b-256 e4b0533fef0d98ae4d5d7cad73c174577a7972e5105e5b7de7ae600bb46ce18f

See more details on using hashes here.

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