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

Track Python-bindings improvements #193

Open
7 tasks
commial opened this issue Jan 22, 2024 · 0 comments
Open
7 tasks

Track Python-bindings improvements #193

commial opened this issue Jan 22, 2024 · 0 comments
Labels
binding Concerns the bindings documentation Improvements or additions to documentation enhancement New feature or request

Comments

@commial
Copy link
Contributor

commial commented Jan 22, 2024

With #190, an initial Python support is provided.

It is still in its early days, and the API might change a lot.

This issue is used to track the futures improvements and associated limitations.

TODO

  • for writing mode, .finalize can be called on Drop to allow for an easier usage.
    • ⚠️ .finalize can't be called twice, otherwise a MLA error will be raised. The Python API can wrap it on Drop, allowing the user to either call it or not
  • support writing chunks to multiple file. A basic implementation would be the direct wrapping of start_file, add_file_content and end_file
  • support for linear_extract wrapping. This could be made using a Python callback, or a given interface (as a Python abstract class) to derive
  • add basic examples to a examples/ directory, and tests them
  • add a README and document usage
  • add build & test instructions (based on maturin and pytest)
  • add a CHANGELOG to track changes

Known caveats

  • For now, MLA structures are not Sync. As a result, a reference on an archive cannot transit between Threads (but they are Send, so the struct itself can)
  • A design change is likely required before having a Python object standing for a file in the Archive. Such an object would ease a more Pythonic interface, with a io.BufferedIO derived class.
@commial commial added documentation Improvements or additions to documentation enhancement New feature or request binding Concerns the bindings labels Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding Concerns the bindings documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant