Luma is better way to write Python documentation. It's a modern replacement for Sphinx that's built on the same tooling Stripe uses for their documentation.
Key benefits of Luma:
- Markdown-native: Avoid Sphinx’s obscure syntax.
- Built for Python: API generation and cross-referencing work out-of-the-box.
- Live rendering: Preview your changes as you write.
To install Luma, install the package from PyPI:
pip install luma-docsOnce you've installed Luma, run the init command, and answer the prompts:
luma initAfter running the command, you'll see a docs/ folder in your current working
directory.
cd into the docs/ folder, and run the dev command to start the local development
server. Then, open the printed address in your browser. The address is usually
http://localhost:3000/.
cd docs
luma devHit Ctrl + C to stop the development server.
Join our Discord to acquire an API key. Then, run the
deploy command to publish your documentation.
luma deploy
After a minute, your documentation will be accessible at
https://{your-package}.luma-docs.org.