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 details)
Built Distribution
File details
Details for the file ObjectMapper-0.0.1.tar.gz
.
File metadata
- Download URL: ObjectMapper-0.0.1.tar.gz
- Upload date:
- Size: 3.1 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 | a84c8960472541687db06dd56effd88f14f14e3c19e8a51068e62bedd3479ec1 |
|
MD5 | 8302e17d12b1129811a373b71562381e |
|
BLAKE2b-256 | 1dcd2a3399fd6498af932909826bb1bc071882df7a919ed456ab002cdf08d006 |
Provenance
File details
Details for the file ObjectMapper-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: ObjectMapper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 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 | 0633caec7e3860e7fd3d71cf24c3ae8c5ed84abf573a8db6ba45e8f5ff6ad3e3 |
|
MD5 | 7fd3dcba131f60b08198e8a061b63555 |
|
BLAKE2b-256 | bebfad5085b4bca880596122b70f7f8221a4ba0de382bb5d515381fd79874174 |