Skip to content

[TASK] Track Python-bindings improvements #193

@commial

Description

@commial

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
  • add a version badge in the main README to track published version

It would also be interesting to split and rename (as MLAFile is ambiguous) MLAFile into MLAReader and MLAWriter :

  • MLAReader
  • MLAWriter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bindingConcerns the bindingsdocumentationImprovements or additions to documentationenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions