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.6.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for objectmapper-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74497ceb082d2dae8f62f050248948278c83251106b843d8b733eba072dde784 |
|
MD5 | b3972686a9033f3ea6b3b763e3a3429c |
|
BLAKE2b-256 | 9d5848dd7040ab1f7da907cb39ba9722fe899a4c499735232785abc383593c9a |