Skip to content

line/centraldogma-python

Repository files navigation

Central Dogma client in Python

PyPI version PyPI Supported Python Versions check Downloads

Python client library for Central Dogma.

Install

$ pip install centraldogma-python

Getting started

Only URL indicating CentralDogma server and access token are required.

>>> from centraldogma.dogma import Dogma
>>> dogma = Dogma("https://dogma.yourdomain.com", "token")
>>> dogma.list_projects()
[]

It supports client configurations.

>>> retries, max_connections = 5, 10
>>> dogma = Dogma("https://dogma.yourdomain.com", "token", retries=retries, max_connections=max_connections)

Please see examples folder for more detail.


Development

Tests

Unit test

$ pytest

Integration test

  1. Run local Central Dogma server with docker-compose

    $ docker-compose up -d
    
  2. Run integration tests

    $ INTEGRATION_TEST=true pytest
    
  3. Stop the server

    $ docker-compose down
    

Lint

Documentation

To build sphinx at local

$ pip install sphinx sphinx_rtd_theme
$ cd docs && make html