Skip to content

docs: add Python library documentation#376

Merged
angpt merged 3 commits intomainfrom
docs-python-lib
Apr 8, 2026
Merged

docs: add Python library documentation#376
angpt merged 3 commits intomainfrom
docs-python-lib

Conversation

@angpt
Copy link
Copy Markdown
Contributor

@angpt angpt commented Apr 3, 2026

  • Added "Building with Python" guide (docs/python/building-with-python.md) covering installation, three build approaches (EncoderfileBuilder, build(), build_from_config()), tokenizer configuration, Lua transforms, cross-compilation, and inspecting binaries
  • Added manually curated Python API reference (docs/python/api-reference.md) with argument tables, types, defaults, and examples for every public class and function
  • Added "Python Library" section to mkdocs.yml nav and docs/index.md
  • Added README.md Option 3 (Python Package) to include uv add encoderfile, fix double-colon typo, and link to the new docs pages

- Added "Building with Python" guide (docs/python/building-with-python.md) covering installation, three build approaches (EncoderfileBuilder, build(), build_from_config()), tokenizer configuration, Lua transforms, cross-compilation, and inspecting binaries
- Added manually curated Python API reference (docs/python/api-reference.md) with argument tables, types, defaults, and examples for every public class and function
- Added "Python Library" section to mkdocs.yml nav and docs/index.md
- Added README.md Option 3 (Python Package) to include uv add encoderfile, fix double-colon typo, and link to the new docs pages
@angpt angpt requested a review from javiermtorres April 3, 2026 17:30
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@javiermtorres javiermtorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of comments

Comment thread docs/python/api-reference.md Outdated
|---|---|---|---|
| `workdir` | `str \| None` | system temp | Temporary working directory for intermediate build files. |
| `version` | `str \| None` | `None` | Override the encoderfile runtime version to embed. Takes precedence over the version set on the builder. |
| `no_download` | `bool` | `False` | Disable downloading the base binary. Requires `base_binary_path` or a cached binary. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's check in a separate PR what would be the error when no_download is specified but the binary is not found.

Co-authored-by: javiermtorres <javier@mozilla.ai>
@angpt angpt merged commit 286ba5b into main Apr 8, 2026
1 check passed
@angpt angpt deleted the docs-python-lib branch April 8, 2026 18:25
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.

3 participants