Coder Social home page Coder Social logo

sqlite-utils-plugin's Introduction

sqlite-utils-plugin cookiecutter template

A cookiecutter template for creating new sqlite-utils plugins. `

Installation

You'll need to have cookiecutter installed. I recommend pipx for this:

pipx install cookiecutter

Regular pip will work OK too.

Usage

Run cookiecutter gh:simonw/sqlite-utils-plugin and then answer the prompts. Here's an example run:

cookiecutter gh:simonw/sqlite-utils-plugin
plugin_name []: plugin template demo
description []: Demonstrating https://github.com/simonw/sqlite-utils-plugin
hyphenated [plugin-template-demo]: 
underscored [plugin_template_demo]: 
github_username []: simonw
author_name []: Simon Willison

I strongly recommend accepting the suggested value for "hyphenated" and "underscored" by hitting enter on those prompts.

This will create a directory called sqlite-utils-plugin-template-demo - the plugin name you enter is converted to lowercase and uses hyphens instead of spaces.

Developing your plugin

Having created the new plugin structure from the template, here's how to start working on the plugin.

You can install the plugin in "editable" mode like so:

sqlite-utils install -e .

Run this in the sqlite-utils-plugin-template-demo directory.

You can also pass the path to that directory like this:

sqlite-utils install -e path/to/sqlite-utils-plugin-template-demo

To confirm it is installed, run:

sqlite-utils plugins

You should see the following:

[
  {
    "name": "sqlite-utils-plugin-template-demo",
    "hooks": [
      "prepare_connection",
      "register_commands"
    ],
    "version": "0.1"
  }
]

You can run the tests for your plugin with pytest - follow the development environment instructions in the plugin's generated README for details.

sqlite-utils-plugin's People

Contributors

simonw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.