Skip to main content

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)

Uploaded Source

Built Distribution

objectmapper-0.0.3-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page