GitHub Issues Import API Client for Python
Modern, typesafe Python client for GitHub's unofficial API for importing issues.
This package is based on the API description by jonmagic. Unlike the official REST or GraphQL APIs, this API allows you to keep the timestamps of the imported issues and comments.
Installation
$ pip install github-issues-import
Dependencies
Usage
import os
from github_issues_import.client import ApiClient, HttpClient
from github_issues_import.models import IssueImportRequest, Issue, Comment
client = ApiClient(http_client=HttpClient(token=os.environ["GITHUB_TOKEN"]))
status = client.import_issue("jonmagic", "i-got-issues", IssueImportRequest(
issue=Issue(
title="My money, mo issues",
body="Required!"
),
comments=[Comment(body="talk talk")],
))
result = client.get_status(status.url)
print(result)
Advanced usage
import os
import httpx
from github_issues_import.client import ApiClient, HttpClient
# httpx client options
client1 = ApiClient(http_client=HttpClient(token=os.environ["GITHUB_TOKEN"], timeout=60))
# own httpx-based client
client2 = ApiClient(http_client=httpx.Client(base_url=HttpClient.BASE_URL))
Development
To release a new version and publish it to PyPI:
- Bump version with
hatchand commithatch version minororhatch version patch
- Create GitHub release (and tag)
Metadata
Release files for github-issues-import 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| github_issues_import-0.4.3.tar.gz | 49.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| github_issues_import-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.2 kB
Release files / github_issues_import-0.4.3.tar.gz
| Download URL | github_issues_import-0.4.3.tar.gz |
|---|---|
| Size | 49.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ba2be85cf6e163b0b54acbed42bb88305920d4f60b010de1e1369abeab5536e
|
|
BLAKE2b-256 checksum How to use checksums |
9d262dcd512b7aecb93a6244c81b755cd37ac69a94feca70834aa5fbc2cb6b39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.17
|
Release files / github_issues_import-0.4.3-py3-none-any.whl
| Download URL | github_issues_import-0.4.3-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c79fb72b7226ec95f128fa7dcbdfe6777d607b1d1c07d14dd982d7ca8cd0f8f
|
|
BLAKE2b-256 checksum How to use checksums |
10db8f46d99121190d311ddd8d96bf7821db098d8afabe995ff40973667a50d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.17
|
Security for github-issues-import 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.