Skip to content

A simple python package which serves as a framework for diffing and patching complex objects. Inspired by Shreyas Kulkarni and git diff and patch.

License

Notifications You must be signed in to change notification settings

thulasi-ram/diff-and-patch

Repository files navigation

Diff & Patch

A simple python package which serves as a framework for diffing and patching complex objects. Inspired by Shreyas Kulkarni and git diff and patch.

Quick links

PyPi: https://pypi.org/project/diff-and-patch/

Source: https://github.com/thulasi-ram/diff-and-patch

Docs: https://github.com/thulasi-ram/diff-and-patch

Quick Usage

See examples

from examples.car import Car, Engine, Passenger
from examples.update_car_service import UpdateCarService

engine = Engine(model='RAWWR')
John = Passenger('John')
Doe = Passenger('Doe')
old_car = Car(
    engine=engine,
    passengers=[John, Doe],
)

new_engine = Engine(model='SUPER_RAWWR')
Anne = Passenger('Anne')
new_car = Car(
    engine=engine,
    passengers=[John, Doe, Anne],
)

UpdateCarService(old_car).update(new_car)

About

A simple python package which serves as a framework for diffing and patching complex objects. Inspired by Shreyas Kulkarni and git diff and patch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages