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.2.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for ObjectMapper-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1de0696b7f789346e6c2f0d19779f59d8d645a448ac8df5060a6e65af87ae2eb |
|
MD5 | f7ba61000a25bbcb19a416b14a6158fb |
|
BLAKE2b-256 | 7bfa770ebe7ef21170470a259271461a25d6f14bcd7bb469c3cc9cf3f854c0b9 |