Introduction
OpenBB CookieCutter
openbb-cookiecutter is a PyPI package with a simple CL utility that creates a new Python project folder to develop OpenBB Python extensions.
Template Structure
The Cookiecutter template prompts the user for information to use in the pyproject.toml file, and then generates a project based on that information.
All fields are optional.
- Your Name
- Your Email
- Project Name
- Project Tag (some-distributable-package)
- Package Name ("include" code folder name - "some_package")
- Provider Name - name of the provider for the entry point - i.e, 'fmp'
- Router Name - name of the router path - i.e.
obb.{some_package} - OBBject Name - name of the OBBject accessor namespace.
The template will generate all extension types as a single, installable Python project. You likely won't always use all in tandem, just delete the unwanted folders and entrypoints.
Usage
- Install in a Python environment from PyPI with:
pip install openbb-cookiecutter
Alternatively, install and launch with uvx:
uvx openbb-cookiecutter
- Navigate the current working directory to the desired output location and run:
openbb-cookiecutter
Enter values or press enter to continue with the default.
-
Create a new Python environment for the project.
-
Navigate into the generated folder and install with:
pip install -e .
-
Python static files will be generated on first import, or trigger with
openbb-build. -
Import the Python package or start the API and use like any other OpenBB application.
-
Modify the business logic and get started building!