Skip to main content

bpmappers

build-status pypi docs

bpmappers is a Python moudle that maps Python dictionary values and object properties to different dictionary.

Install

Install using pip.

$ pip install bpmappers

Usage

An example of mapping an instance of the Person class to a dictionary:

>>> class Person:
...     def __init__(self, name, age):
...         self.name = name
...         self.age = age
...     def __repr__(self):
...         return "<Person name={}, age={}>".format(self.name, self.age)
...
>>> p = Person("Spam", 25)
>>> p
<Person name=Spam, age=25>
>>> from bpmappers import Mapper, RawField
>>> class PersonMapper(Mapper):
...     mapped_name = RawField('name')
...     mapped_age = RawField('age')
...
>>> PersonMapper(p).as_dict()
OrderedDict([('mapped_name', 'Spam'), ('mapped_age', 25)])

Requirements

  • Target Python version is 3.6, 3.7, 3.8, 3.9

  • Django 2.2, 3.0, 3.1 (When use Django support)

License

This software is licensed under the MIT License.

Documentation

The latest documentation is hosted at Read The Docs.

https://bpmappers.readthedocs.io/ja/stable/

Develop

Author

  • BeProud, Inc

Maintainer

Release files for bpmappers 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bpmappers 1.3
File Size Uploaded
bpmappers-1.3.tar.gz 283.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bpmappers 1.3
File Interpreter ABI Platform
bpmappers-1.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 291.9 kB

Release files / bpmappers-1.3.tar.gz

Download URL bpmappers-1.3.tar.gz
Size 283.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0322bbf7637d0243fe2b8815f7ab9f7bbf974919ed6e4c5f17b83365cba7fe67
BLAKE2b-256 checksum
How to use checksums
b7a570d2aaf3b49c1a1a8eff8e2fc65f641e02bd5615e18e8aa555818f66e072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.2

Release files / bpmappers-1.3-py2.py3-none-any.whl

Download URL bpmappers-1.3-py2.py3-none-any.whl
Size 8.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5463895ab9686f6f29df37496f6172cb2edd71d4c712a8ed8e98a6344303334b
BLAKE2b-256 checksum
How to use checksums
f2671950f4d688a85967d6a258f6d67d58359b215e3c6c04a82c28323f8d40a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.2

Release history Release notifications | RSS feed

This release

1.3 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0.1

1 release file

0.9

2 release files

0.8.2

2 release files

0.8

2 release files

0.7

8 release files

0.6

6 release files

0.5.1

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page