Metadata-Version: 2.1
Name: centraldogma-python
Version: 0.4.0
Summary: Python client library for Central Dogma
Home-page: https://github.com/line/centraldogma-python
Author: Central Dogma Team
Author-email: dl_centraldogma@linecorp.com
License: Apache License 2.0
Keywords: centraldogma
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: dataclasses-json
Requires-Dist: httpx[http2]
Requires-Dist: marshmallow
Requires-Dist: pydantic
Requires-Dist: python-dateutil
Requires-Dist: tenacity

# Central Dogma client in Python

[![PyPI version](https://badge.fury.io/py/centraldogma-python.svg)](https://badge.fury.io/py/centraldogma-python)
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/centraldogma-python.svg)](https://pypi.python.org/pypi/centraldogma-python/)
[![check](https://github.com/line/centraldogma-python/actions/workflows/test.yml/badge.svg)](https://github.com/line/centraldogma-python/actions/workflows/test.yml)
[![Downloads](https://static.pepy.tech/badge/centraldogma-python/month)](https://pepy.tech/project/centraldogma-python)

Python client library for [Central Dogma](https://line.github.io/centraldogma/).

## Install
```
$ pip install centraldogma-python
```

## Getting started
Only URL indicating CentralDogma server and access token are required.
```pycon
>>> from centraldogma.dogma import Dogma
>>> dogma = Dogma("https://dogma.yourdomain.com", "token")
>>> dogma.list_projects()
[]
```

It supports client configurations.
```pycon
>>> retries, max_connections = 5, 10
>>> dogma = Dogma("https://dogma.yourdomain.com", "token", retries=retries, max_connections=max_connections)
```

Please see [`examples` folder](https://github.com/line/centraldogma-python/tree/main/examples) 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
- [PEP 8](https://www.python.org/dev/peps/pep-0008)
    ```
    $ black .
    ```

### Documentation
- [PEP 257](https://www.python.org/dev/peps/pep-0257)

#### To build sphinx at local
```
$ pip install sphinx sphinx_rtd_theme
$ cd docs && make html
```
