BDK Setup Guide
Learn how to set up your Book project with the BDK.
Prerequisites
Ensure the following prerequisites are met and dependencies are installed before proceeding.
1. Python 3.11+
pyenv (recommended)
Pyenv is used to manage Python versions and project dependencies with the pyenv-virtualenv plugin.
- Follow the installation steps for pyenv.
- Follow the installation steps for pyenv-virtualenv.
Python can be installed with pyenv in the following way:
pyenv install 3.11
2. Git
3. Docker
4. pipx
5. Poetry
6. Cookiecutter
Setting Up Your Project
Set up your project using the BDK Template, a tool designed to simplify the creation of Books.
1. Clone and Initialize
Clone the BDK Template from GitHub and initialize your project with Cookiecutter:
cookiecutter git+ssh://[email protected]/kognitos/bdk-template.git

Enter the following project details or press Enter to keep the defaults:
Configuration | Description | Default |
---|---|---|
Project Name | The name of your project. | Sample Book |
Project Slug | A URL-friendly version of the project name. If not provided, this will be derived from the project name. | sample_book |
Project Description | A short description of the project. | A short description of the project. |
Author Name | You or your organization's name. | Kognitos |
Initial Version | Initial project version. | 0.1.0 |
2. Enter Project Directory
Navigate into the new project directory. Replace project_slug
with your own Project Slug from the previous step:
cd <project_slug>

3. Create a Virtual Environment (recommended)
We recommend creating a virtual environment to isolate and manage your project dependencies.
1. Configure Poetry to create the virtual environment inside the project’s root directory:
poetry config virtualenvs.in-project true
2. Create a virtual environment:
poetry env use 3.11
Setting your local pyenv version
If you are using pyenv and encounter the following error:
pyenv: python3.11: command not found
The python3.11' command exists in these Python versions:
3.11.11
Run the following command to set the local pyenv version for the current directory:
pyenv local 3.11
3. Activate the virtual environment
Run poetry shell
or manually activate the environment using the following commands:
source $(poetry env info --path)/bin/activate
Note: To later exit the virtual environment later, run
deactivate
.

4. Install dependencies
poetry install

Updated about 1 month ago