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 details)
Built Distribution
File details
Details for the file objectmapper-0.0.3.tar.gz
.
File metadata
- Download URL: objectmapper-0.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5c33f1d7727f190db141d12696f24944a0de624c62bc3db7ee1be287387183b |
|
MD5 | 2b2ccdf1e62fb9d620f015af358cc7fc |
|
BLAKE2b-256 | 97bfe6cfce972ecc3f80c10270fcac5c3dab6d6d7bd515ec7b90938813400d54 |
Provenance
File details
Details for the file objectmapper-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: objectmapper-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc60e0603466f40d4a4185e7abbb673551187beeed36c7551e5aacd7cbd54891 |
|
MD5 | 8a565d1bc080b3ba9b131ab54526d0c4 |
|
BLAKE2b-256 | 5de72529af727a9086743e6ed166a878ec1cf31e14852ea77401c8f9d28c486d |