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.
Dates
- diff_month(date_from, date_to)
Returns number of months between dates ‘date_from’ and ‘date_to’
- diff_days(date_from, date_to)
Returns number of days between dates ‘date_from’ and ‘date_to’
- week_range(date)
Returns a tuple of ‘(start_date, end_date)’ of week range by given date.
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.
Metadata
Release files for python-pragmatic 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-pragmatic-1.0.0.tar.gz | 4.3 kB | Without provenance | Details for python-pragmatic-1.0.0.tar.gz |
Release files / python-pragmatic-1.0.0.tar.gz
| Download URL | python-pragmatic-1.0.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e44a20dc2a233d5ed69832c2d75750ab4367c39cbba149a752ea402f9f40787c
|
|
BLAKE2b-256 checksum How to use checksums |
0180d669e126e9e3fac773d27c41ecce8d8621498f6ab5a05855c60a90aee8ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.9
|
Security for python-pragmatic 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.