Metadata-Version: 2.1
Name: pyzenhub
Version: 0.3.2
Summary: Python bindings to the Zenhub API
Home-page: https://github.com/goanpeca/pyzenhub
Author: Gonzalo Pena-Castellanos
Author-email: goanpeca@gmail.com
License: MIT
Project-URL: Source, https://github.com/goanpeca/pyzenhub
Project-URL: Tracker, https://github.com/goanpeca/pyzenhub/issues
Project-URL: Changelog, https://github.com/goanpeca/pyzenhub/blob/main/CHANGELOG.md
Keywords: zenhub,api
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# PyZenHub

Python bindings to the Zenhub API.

## Project status

[![License](https://img.shields.io/pypi/l/pyzenhub.svg?color=green)](https://github.com/goanpeca/pyzenhub/raw/main/LICENSE.txt)
[![PyPI](https://img.shields.io/pypi/v/pyzenhub.svg?color=green)](https://pypi.org/project/pyzenhub)
[![Python
Version](https://img.shields.io/pypi/pyversions/pyzenhub.svg?color=green)](https://python.org)
[![Tests](https://github.com/goanpeca/pyzenhub/actions/workflows/test_pull_request.yml/badge.svg?branch=main)](https://github.com/goanpeca/pyzenhub/actions/workflows/test_pull_request.yml)
[![Typing](https://github.com/goanpeca/pyzenhub/actions/workflows/test_typing.yml/badge.svg)](https://github.com/goanpeca/pyzenhub/actions/workflows/test_typing.yml)
[![codecov](https://codecov.io/gh/goanpeca/pyzenhub/branch/main/graph/badge.svg?token=dcsjgl1sOi)](https://codecov.io/gh/goanpeca/pyzenhub)

## Usage

```python
from zenhub import Zenhub

zh = Zenhub('<zenhub_token>')
zh.get_epics('<repo_id>')  # Dictionary
```

Return models instead of dictionaries

```python
from zenhub import Zenhub

zh = Zenhub('<zenhub_token>', return_models=True)
zh.get_epics('<repo_id>')  # Pydantic model!
```

*Methods will always return dates as `datetime.datetime` objects, not strings.*

### For enterprise installs

```python
from zenhub import Zenhub

zh = Zenhub('<zenhub_token>', base_url='<enterprise-api-endpoint>')
zh.get_epics('<repo_id>')
```

To select the enterprise version use the `enterprise` parameter.

```python
from zenhub import Zenhub

zh2 = Zenhub('<zenhub_token>', base_url='<enterprise-api-endpoint>', enterprise=2)
zh.get_epics('<repo_id>')

zh3 = Zenhub('<zenhub_token>', base_url='<enterprise-api-endpoint>', enterprise=3)
zh.get_epics('<repo_id>')
```

## Documentation

See [ZenHub official API documentation](https://github.com/ZenHubIO/API).
