# 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).
Raw data
{
"_id": null,
"home_page": "https://github.com/goanpeca/pyzenhub",
"name": "pyzenhub",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "zenhub,api",
"author": "Gonzalo Pena-Castellanos",
"author_email": "goanpeca@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a2/6c/852a4dc8e8a627f16bf0e1cdf08b0628c4b41abe54e0b8914820862c1cd2/pyzenhub-0.3.2.tar.gz",
"platform": null,
"description": "# PyZenHub\n\nPython bindings to the Zenhub API.\n\n## Project status\n\n[![License](https://img.shields.io/pypi/l/pyzenhub.svg?color=green)](https://github.com/goanpeca/pyzenhub/raw/main/LICENSE.txt)\n[![PyPI](https://img.shields.io/pypi/v/pyzenhub.svg?color=green)](https://pypi.org/project/pyzenhub)\n[![Python\nVersion](https://img.shields.io/pypi/pyversions/pyzenhub.svg?color=green)](https://python.org)\n[![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)\n[![Typing](https://github.com/goanpeca/pyzenhub/actions/workflows/test_typing.yml/badge.svg)](https://github.com/goanpeca/pyzenhub/actions/workflows/test_typing.yml)\n[![codecov](https://codecov.io/gh/goanpeca/pyzenhub/branch/main/graph/badge.svg?token=dcsjgl1sOi)](https://codecov.io/gh/goanpeca/pyzenhub)\n\n## Usage\n\n```python\nfrom zenhub import Zenhub\n\nzh = Zenhub('<zenhub_token>')\nzh.get_epics('<repo_id>') # Dictionary\n```\n\nReturn models instead of dictionaries\n\n```python\nfrom zenhub import Zenhub\n\nzh = Zenhub('<zenhub_token>', return_models=True)\nzh.get_epics('<repo_id>') # Pydantic model!\n```\n\n*Methods will always return dates as `datetime.datetime` objects, not strings.*\n\n### For enterprise installs\n\n```python\nfrom zenhub import Zenhub\n\nzh = Zenhub('<zenhub_token>', base_url='<enterprise-api-endpoint>')\nzh.get_epics('<repo_id>')\n```\n\nTo select the enterprise version use the `enterprise` parameter.\n\n```python\nfrom zenhub import Zenhub\n\nzh2 = Zenhub('<zenhub_token>', base_url='<enterprise-api-endpoint>', enterprise=2)\nzh.get_epics('<repo_id>')\n\nzh3 = Zenhub('<zenhub_token>', base_url='<enterprise-api-endpoint>', enterprise=3)\nzh.get_epics('<repo_id>')\n```\n\n## Documentation\n\nSee [ZenHub official API documentation](https://github.com/ZenHubIO/API).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python bindings to the Zenhub API",
"version": "0.3.2",
"project_urls": {
"Changelog": "https://github.com/goanpeca/pyzenhub/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/goanpeca/pyzenhub",
"Source": "https://github.com/goanpeca/pyzenhub",
"Tracker": "https://github.com/goanpeca/pyzenhub/issues"
},
"split_keywords": [
"zenhub",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "698e440566faaf5e03a3c34986717df07a1631439906161fe32a0d1747a6bed7",
"md5": "bb866d3bb8ec2f9205d6f840fa0afcfd",
"sha256": "37493ef893168feb54e8413eed79f7c6c260226c0f8b4ca7260e02a2557e4abe"
},
"downloads": -1,
"filename": "pyzenhub-0.3.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb866d3bb8ec2f9205d6f840fa0afcfd",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 19008,
"upload_time": "2023-07-13T16:43:06",
"upload_time_iso_8601": "2023-07-13T16:43:06.403054Z",
"url": "https://files.pythonhosted.org/packages/69/8e/440566faaf5e03a3c34986717df07a1631439906161fe32a0d1747a6bed7/pyzenhub-0.3.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a26c852a4dc8e8a627f16bf0e1cdf08b0628c4b41abe54e0b8914820862c1cd2",
"md5": "06960a5f3bbf61cb63553653ea81e2ac",
"sha256": "26ecafccbd00edd652fbc8204fa218c25eaa89fc827db70e3fa9a4ea7384c910"
},
"downloads": -1,
"filename": "pyzenhub-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "06960a5f3bbf61cb63553653ea81e2ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 16015,
"upload_time": "2023-07-13T16:43:08",
"upload_time_iso_8601": "2023-07-13T16:43:08.018269Z",
"url": "https://files.pythonhosted.org/packages/a2/6c/852a4dc8e8a627f16bf0e1cdf08b0628c4b41abe54e0b8914820862c1cd2/pyzenhub-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-13 16:43:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "goanpeca",
"github_project": "pyzenhub",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyzenhub"
}