Skip to content

KitBuilder is a library used for generating API-based and CLI-based SDK using only one file!

Notifications You must be signed in to change notification settings

kitbuilder-lib/kitbuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python

KitBuilder

🔧KitBuilder🔧

KitBuilder is a library used for generating API-based and CLI-based SDK for multiple programming languages using only one definition file!

Tutorial

Initialization is pretty straight-forward. Simply install the package for your programming language, import and run build function.

Tutorial below showcases how to run KitBuilder on Python

  1. Install KitBuilder package
pip3 install kitbuilder
  1. Create YAML definition with the name of dog.api.yaml:
name: DogAPI
description: Showcase

environment:
    # Will be using DogCEO API
    API_URL: https://dog.ceo

functions:
    get:
        type: request

        args:
            - breed

        config:
            method: GET
            url: "%{{ [environment][API_URL] }}%/api/breed/%{{ [args][breed] }}%/images/random"
  1. Import and run!
from kitbuilder import Kit

DogAPI = Kit("dog.api.yaml").build()

api = DogAPI()

pitbull = api.get("pitbull")

print(pitbull.json())

Support

NOTE Since KitBuilder is currently v0.1, it will be heavily limited in functionality and usage across different programming languages. Goal is to have at least 5 different programming languages supported

Currently, KitBuilder is supported for:

  • Python