Modern, typesafe Python client for GitHub's unofficial API for importing issues
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_issues_import-0.4.3.tar.gz.
File metadata
- Download URL: github_issues_import-0.4.3.tar.gz
- Upload date:
- Size: 49.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba2be85cf6e163b0b54acbed42bb88305920d4f60b010de1e1369abeab5536e
|
|
| MD5 |
5816613b5994fb042e2d88f799b03b8a
|
|
| BLAKE2b-256 |
9d262dcd512b7aecb93a6244c81b755cd37ac69a94feca70834aa5fbc2cb6b39
|
File details
Details for the file github_issues_import-0.4.3-py3-none-any.whl.
File metadata
- Download URL: github_issues_import-0.4.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c79fb72b7226ec95f128fa7dcbdfe6777d607b1d1c07d14dd982d7ca8cd0f8f
|
|
| MD5 |
f2aa8911925e6c2904b1815cace1e3eb
|
|
| BLAKE2b-256 |
10db8f46d99121190d311ddd8d96bf7821db098d8afabe995ff40973667a50d3
|