https://github.com/thulasi-ram/diff-and-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.
https://github.com/thulasi-ram/diff-and-patch
diff difference patch patcher python
Last synced: 8 months ago
JSON representation
A simple python package which serves as a framework for diffing and patching complex objects. Inspired by Shreyas Kulkarni and git diff and patch.
- Host: GitHub
- URL: https://github.com/thulasi-ram/diff-and-patch
- Owner: thulasi-ram
- License: gpl-3.0
- Created: 2018-08-26T12:34:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-26T14:47:27.000Z (about 7 years ago)
- Last Synced: 2025-01-18T00:53:55.219Z (9 months ago)
- Topics: diff, difference, patch, patcher, python
- Language: Python
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
==============
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 UpdateCarServiceengine = 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)