/copier-mindsdb-handler

Copier template to generate boilerplate code for new MindsDB's handlers

Primary LanguageJinja

Copier MindsDB Handler

Copier template for developers willing to implement new handlers for MindsDB. It generates the boilerplate code so you can focus on what really matters and speed up the implementation process

Note: For now it's only supported to generate the boilerplate code for MindsDB Application Handlers, mainly because there is a high amount of opened issues waiting for contributors who wish to support

Requirements

To use this Copier template, you will need:

To install Copier, use pip or pipx:

pip install --user copier
pip install --user pipx
pipx install copier

Usage

Make sure you are placed into the mindsdb's root directory. Then:

copier copy "https://github.com/rmaceissoft/copier-mindsdb-handler.git" .

Or even shorter:

copier copy "gh:rmaceissoft/copier-mindsdb-handler" .

You will be asked some questions.

🎤 What is your handler name?
🎤 What is your handler table name? (if more than one, separate by comma)
🎤 Do you want to generate APITable' select() method?
🎤 Do you want to generate APITable' insert() method?
🎤 Do you want to generate APITable' update() method?
🎤 Do you want to generate APITable' delete() method?

Answer them and the following directory structure will be scaffolded:

.
│   ├── mindsdb
│   │   ├── integrations
│   │   │   ├── handlers
│   │   │   │   ├── <handler_name>_handler
│   │   │   â”‚   │   ├── README.md
│   │   │   â”‚   │   ├── __about__.py
│   │   │   â”‚   │   ├── __init__.py
│   │   │   â”‚   │   ├── icon.svg
│   │   │   â”‚   │   ├── requirements.txt
│   │   │   â”‚   │   ├── <handler_name>_handler.py
│   │   │   â”‚   │   └── <handler_name>_tables.py