A small module for mapping between object types.
Project description
A small module for mapping between object types.
Installation
objectmapper requires Python >= 3.6 because it relies on modern type annotations.
pip install objectmapper
Example
>>> import objectmapper >>> mapper = objectmapper.ObjectMapper() >>> def int_to_str(i: int) -> str: ... return str(i) >>> mapper.create_map(int, str, int_to_str) >>> mapper.map(42, str) '42'
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
objectmapper-0.0.4.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for objectmapper-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1750abac4f387bdf50e3bd83aed8f44624de131bd60a8d0bbed31e9e8f89332 |
|
MD5 | b04d5d18e04a93adce1b861a0e2c04b2 |
|
BLAKE2b-256 | cfd6d1131c3cc6e9dbf4c464f3e336a6581b2a491ce186c1eb3f04e3a5ad3179 |