Python Library¶
This section explains how to build a Python library: how to organize it, how to
design its API, how to test it, and how to install and use it.
We will use esperantilo, the very package this project ships, as the example.
- 1. What is a library — packages, modules and distributions.
- 2. Organization —
pyproject.toml,src/,tests/. - 3. Installation and usage — from GitHub, in a notebook.
- 4. API — designing a clear public interface, spaCy-style.
- 5. Testing —
pytestand continuous integration. - FAQ — quick answers to common doubts.
See the result
Every technique on these pages is applied in this repository. The
Library section is the outcome: the reference
manual of esperantilo, with an
API reference generated from the very docstrings
this section teaches you to write.