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.5.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for objectmapper-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5fb68d2100849af52a8de4c0cfed2265eb42c1a6b6544fb33f499f42e71eabc |
|
MD5 | 7a1d948d8f73b3e51668df026548fcda |
|
BLAKE2b-256 | 8725b1d661b43f777b4a1f7f53e79385229a7aa377a86cd45204a4b62b018807 |