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.3.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for objectmapper-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc60e0603466f40d4a4185e7abbb673551187beeed36c7551e5aacd7cbd54891 |
|
MD5 | 8a565d1bc080b3ba9b131ab54526d0c4 |
|
BLAKE2b-256 | 5de72529af727a9086743e6ed166a878ec1cf31e14852ea77401c8f9d28c486d |