Magicmapper
Unconventional (?) approach to mapping data from one object to another.
Usage
Check out test_magic.py for some examples. The fundamental idea is that we define a target schema which we can populate using the magicmapper. Consider the following source data
source_data = [
{
"person": {
"name": "foo1"
}
},
{
"person": {
"name": "foo2"
}
},
]
Say we'd like to map this to this
destination_data = [
{
"name": "foo1"
},
{
"name": "foo2"
},
]
This could be done with the following magicmapping
from magicmapper import magic_map, Schema, Value
magic_map([Schema({"name": Value("person") >> Value("name")})], test_source_data)
Metadata
Release files for magicmapper 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| magicmapper-0.9.1.tar.gz | 5.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| magicmapper-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / magicmapper-0.9.1.tar.gz
| Download URL | magicmapper-0.9.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45eb9f2649de152979523e074fc76bab19da94d2b484ac8334c74fa77e7141d7
|
|
BLAKE2b-256 checksum How to use checksums |
e4b300ab3a535fa308d667507ec617a8ad57715470691edcfd93c5372c135729
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / magicmapper-0.9.1-py3-none-any.whl
| Download URL | magicmapper-0.9.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e9d9d19717a4840cbf024d0846e205746f389cd094f9c9b1fbb295550a88f01
|
|
BLAKE2b-256 checksum How to use checksums |
eba6ace9ea47bc61460d381e9bb9c6552bbca865e1b76c7e95b48c6743f23dea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for magicmapper 0.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.