Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Ledger Python module into Python package #2196

Closed
wants to merge 1 commit into from

Conversation

afh
Copy link
Member

@afh afh commented Feb 14, 2023

Allowing to extend the Python Ledger package with pure Python classes and methods as well as adding functionality to existing native classes using Python.

This is a draft PR as I'd like to get a conversation going about the pros and cons of the proposed change.

On the one hand this change will bring a lot of flexibility for future additions written entirely in Python and decouples the Python API for people using the Ledger Python package from what is exposed by Ledger's C++ native code via Boost.Python.

On the other hand this may break backwards compatibility, yet the change to migrate script is fairly straight-forward: Change import ledger to import ledger.core as ledger.

I'm not using ledger python much, so things may break there, for example it was necessary to change the module name in test/baseline/feat-value_py3.test from ledger to _core in order to make the tests pass.
There may be ways around it, I'm not sure yet.

Allowing to extend the Python Ledger package with pure Python
classes and methods as well as adding functionality to existing
native classes using Python.
@afh afh requested review from jwiegley, q3aiml and tbm February 14, 2023 01:54
@afh afh self-assigned this Feb 14, 2023
@afh afh added enhancement New feature or request python Related to the Python API labels Feb 14, 2023
@tbm
Copy link
Contributor

tbm commented Feb 14, 2023

Adding @davidsklar in case he has input.

@afh
Copy link
Member Author

afh commented Apr 12, 2023

Closing this PR as as it has served its purpose to explore how to add a Ledger Python Package. I'm working on improving this further, but what work in progess is neither in draft nor review state at the moment.

@afh afh closed this Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Related to the Python API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants