|
| 1 | +# OpenBB ODP Extensions Cookiecutter |
| 2 | + |
| 3 | +[Cookiecutter](https://cookiecutter.readthedocs.io/en/1.7.2/) is a command-line utility that creates projects from templates. |
| 4 | + |
| 5 | +This extension is a simple template for setting up new OpenBB Python Package extensions and projects. |
| 6 | + |
| 7 | +## Template Structure |
| 8 | + |
| 9 | +The Cookiecutter template prompts the user for information to use in the `pyproject.toml` file, and then generates a project based on that information. |
| 10 | +All fields are optional. |
| 11 | + |
| 12 | +- Your Name |
| 13 | +- Your Email |
| 14 | +- Project Name |
| 15 | +- Project Tag (some-distributable-package) |
| 16 | +- Package Name ("include" code folder name - "some_package") |
| 17 | +- Provider Name - name of the provider for the entry point - i.e, 'fmp' |
| 18 | +- Router Name - name of the router path - i.e. `obb.{some_package}` |
| 19 | +- OBBject Name - name of the OBBject accessor namespace. |
| 20 | + |
| 21 | +The template will generate all extension types as a single, installable Python project. |
| 22 | +You likely won't always use all in tandem, just delete the unwanted folders and entrypoints. |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +1. Install in a Python environment from PyPI with: |
| 27 | + |
| 28 | +``` |
| 29 | +pip install openbb-cookiecutter |
| 30 | +``` |
| 31 | + |
| 32 | +Alternatively, with `uvx`: |
| 33 | + |
| 34 | +``` |
| 35 | +uvx openbb-cookiecutter |
| 36 | +``` |
| 37 | + |
| 38 | +2. Navigate the current working directory to the desired output location and run: |
| 39 | + |
| 40 | +``` |
| 41 | +openbb-cookiecutter |
| 42 | +``` |
| 43 | + |
| 44 | +Enter values or press `enter` to continue with the default. |
| 45 | + |
| 46 | +3. Create a new Python environment for the project. |
| 47 | + |
| 48 | +4. Navigate into the generated folder and install with: |
| 49 | + |
| 50 | +``` |
| 51 | +pip install -e . |
| 52 | +``` |
| 53 | + |
| 54 | +5. Python static files will be generated on first import, or trigger with `openbb-build`. |
| 55 | + |
| 56 | +6. Import the Python package or start the API and use like any other OpenBB application. |
| 57 | + |
| 58 | +7. Modify the business logic and get started building! |
| 59 | + |
| 60 | +See the developer documentation [here](https://docs.openbb.co/python/developer). |
| 61 | + |
| 62 | +## Contributing |
| 63 | + |
| 64 | +We welcome contributions to this template! Please feel free to open an issue or submit a pull request with your improvements. |
| 65 | + |
| 66 | +## Contacts |
| 67 | + |
| 68 | +If you have any questions about the cookiecutter or anything OpenBB, feel free to email us at `[email protected]` |
| 69 | + |
| 70 | +If you want to say hi, or are interested in partnering with us, feel free to reach us at `[email protected]` |
| 71 | + |
| 72 | +Any of our social media platforms: [openbb.co/links](https://openbb.co/links) |
0 commit comments