Skip to content

pyzenhub/pyzenhub

Repository files navigation

PyZenHub

Python bindings to the Zenhub API.

Project status

License PyPI Python Version Tests Typing codecov

Usage

from zenhub import Zenhub

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

Return models instead of dictionaries

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

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.

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.