Skip to content

RFC: Formalize reader and writer API#499

Draft
palemieux wants to merge 4 commits intomasterfrom
feature/formalize-api
Draft

RFC: Formalize reader and writer API#499
palemieux wants to merge 4 commits intomasterfrom
feature/formalize-api

Conversation

@palemieux
Copy link
Copy Markdown
Contributor

Formalize and normalize the reader and writer API:

def to_model(data_file: typing.BinaryIO, _config=None, progress_callback=lambda _: None) -> typing.Optional[model.ContentDocument]

def from_model(
  model_doc: model.ContentDocument,
  output: typing.BinaryIO,
  config: typing.Optional[imsc_config.IMSCWriterConfiguration] = None,
  progress_callback: typing.Callable[[numbers.Real], typing.NoReturn] = lambda _: None
  ):

Reading and writing from/to binary streams is required since some formats are text based and other are binary.

Closes #470

@palemieux palemieux changed the title RFC: Formalize API RFC: Formalize reader and writer API Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve API documentation

1 participant