Building Extensions for OpenBB Platform
We have a Cookiecutter template that will help you get started. It serves as a jumpstart for your extension development, so you can focus on the data and not on the boilerplate.
Please refer to the Cookiecutter template and follow the instructions there.
This document will walk you through the steps of adding a new extension to the OpenBB Platform.
The high level steps are:
- Generate the extension structure
- Install your dependencies
- Install your new package
- Use your extension (either from Python or the API interface)
- QA your extension
- Share your extension with the community
Best Practices
- Review Platform Dependencies: Before adding any dependency, ensure it aligns with the Platform's existing dependencies.
- Use Loose Versioning: If possible, specify a range to maintain compatibility. E.g.,
>=1.4,<1.5. - Testing: Test your extension with the Platform's core to avoid conflicts. Both unit and integration tests are recommended.
- Document Dependencies: Use
pyproject.tomlandpoetry.lockfor clear, up-to-date records.