LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • BDK Overview
  • Planning Guide
  • Setup Guide
  • Development Guide
  • Deployment
  • Learning a BDK Book
  • Connection Commands
  • BDK API Reference
    • Concepts
    • Connections
    • Decorators
      • @book
      • @concept
      • @config
      • @connect
      • @oauth
      • @oauthtoken
      • @procedure
    • Docstrings
    • Enums
      • FilterBinaryOperator
      • FilterUnaryOperator
    • Filter Expressions
    • Noun Phrases
    • Procedures
Powered by GitBook
On this page
  • Prerequisites
  • Setting Up Your Project
  • 1. Clone and Initialize
  • 2. Enter Project Directory
  • 3. Create a Virtual Environment (recommended)

Was this helpful?

Export as PDF

Setup Guide

Learn how to set up your Book project with the BDK.

Last updated 1 month ago

Was this helpful?

Prerequisites

Ensure the following prerequisites are met and dependencies are installed before proceeding.

1.

pyenv (recommended)

Pyenv manages Python versions and project dependencies with the pyenv-virtualenv plugin.

  1. Follow the installation steps for .

  2. Follow the installation steps for .

Python can be installed with pyenv in the following way:

pyenv install 3.11

2.

3.

4.

5.

6.


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

cookiecutter git+ssh://git@github.com/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.

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

source $(poetry env info --path)/bin/activate
Invoke-Expression (poetry env activate)

Note: To later exit the virtual environment later, run deactivate.

4. Install dependencies

poetry install

Clone the from GitHub and initialize your project with Cookiecutter:

1. to create the virtual environment inside the project’s root directory:

Run poetry shell or manually using the following commands:

Python 3.11+
pyenv
pyenv-virtualenv
Git
Docker
pipx
Poetry
Cookiecutter
BDK Template
Configure Poetry
activate the environment