anikolaienko / py-automapper

Python object auto mapper
https://anikolaienko.github.io/py-automapper/
MIT License
59 stars 10 forks source link

Add mapping from multiple classes #1

Open anikolaienko opened 2 years ago

anikolaienko commented 2 years ago

I want to be able to map from more than one class:

mapper.add(FromClassA, FromClassB, ToClassC)

target_obj = mapper.multimap(obj1, obj2)
# or
target_obj = mapper.to(TargetType).multimap(obj1, obj2)
anikolaienko commented 6 months ago

I don't have specific test cases for this and not sure should this should work without producing unexpected behaviour.