Pragmatic tools and utilities for Python projects
Project description
Pragmatic tools and utilities for Python projects.
Tested on Python 2.7.
Requirements
Some utilities require additional libraries as:
Pillow/PIL
pyBarcode
Installation
Using pip: pip install python-pragmatic
Usage
Classes
- get_subclasses(classes, level=0)
Return the list of all subclasses for given class (or list of classes).
- get_parent_classes(class)
Return the list of all parent classes for given class.
Numbers
- round_to_n_decimal_places(value, n)
Returns number rounded to n decimal places.
OS
- base64_to_file(content, file_path)
Stores base64 encoded content to file.
Strings
- generate_hash(length=5)
Returns random generated string
- barcode(code, args=None)
Returns barcode as string encoded in base64 format.
- remove_accents(input)
Returns input string without accent characters.
Thirdparty
- class BarcodeImageWriter(ImageWriter)
Fixed version of barcode.writer.ImageWriter.
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
File details
Details for the file python-pragmatic-0.1.0.tar.gz
.
File metadata
- Download URL: python-pragmatic-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b386c196061deba48a71bb48272a8f20275ffa51ed21f61d1f2075c5031f422 |
|
MD5 | c4b36fe166a73dfb23d0b90df2e54158 |
|
BLAKE2b-256 | a6cd13021eaf3c0258e547b8960c62965186cbf29881a5e9523d284853146a14 |