Skip to content

Python client for Drone CI API. Manages authentication against Drone CI and performs common Drone CI API operations using a Python wrapper.

License

Notifications You must be signed in to change notification settings

bellyjay1005/pydroneapi

Repository files navigation

pydroneapi

Run Python Tests Push to PyPi Build and Push Docker Images Build and Push Image to Githug Registry Main Deploy Latest Version Download Status License

A DRONE CI Server - Python helper scripts to manage API interactions and operations.

This tool manages authentication against Drone CI and performs common Drone CI API operations using a Python wrapper.

Prerequisites

Installation

From PyPI:

pip install pydroneapi

From source:

git clone --recursive https://github.com/bellyjay1005/pydroneapi
cd pydroneci
python setup.py install

From Github directly:

pip3 install pydroneapi@git+https://github.com/bellyjay1005/pydroneci

Usage

Example:

from pydroneapi import PyDroneAPI

# Sync application github repository with Drone pipeline
drone = PyDroneAPI(
    drone_host='https://example.com',
    token='abcd1234',
    repo='bellyjay1005/test-repo',
)

sync_res = drone.synchronize_repository()
if not sync_res[0]['id']:
    print('New Repository Not Synchronized. Error Message - %s', sync_res)
    return False

Development & Test

Reference make help for more commands used for development and testing of source codes.

About

Python client for Drone CI API. Manages authentication against Drone CI and performs common Drone CI API operations using a Python wrapper.

Resources

License

Stars

Watchers

Forks