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.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for ObjectMapper-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0633caec7e3860e7fd3d71cf24c3ae8c5ed84abf573a8db6ba45e8f5ff6ad3e3 |
|
MD5 | 7fd3dcba131f60b08198e8a061b63555 |
|
BLAKE2b-256 | bebfad5085b4bca880596122b70f7f8221a4ba0de382bb5d515381fd79874174 |