Name | ogr JSON |
Version |
0.56.0
JSON |
| download |
home_page | None |
Summary | One API for multiple git forges. |
upload_time | 2025-08-20 10:17:44 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
api
git
github
gitlab
pagure
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# One Git library to Rule




[](https://softwarefactory-project.io/zuul/t/local/builds?project=packit-service/ogr)
[](https://github.com/psf/black)
[](https://github.com/pre-commit/pre-commit)
Library for one API for many git forges. (e.g. GitHub, GitLab, Pagure).
## Currently supported git forges:
- GitHub
- GitLab
- Pagure
## To start using ogr:
See [Documentation of Index of Sub-modules, Functions & Classes](https://packit.github.io/ogr)
For examples of how to use `ogr` see [Jupyter examples](examples).
### GitHub
This snippet shows how to obtain all releases for certain GitHub project using ogr.
```python
from ogr.services.github import GithubService
service = GithubService(token="your_token")
ogr_project = service.get_project(
repo="ogr",
namespace="packit-service"
)
ogr_releases = ogr_project.get_releases()
for release in ogr_releases:
print(release.tag_name)
```
This will output:
```
0.7.0
0.6.0
0.5.0
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
0.0.3
0.0.2
0.0.1
```
You can use the same API for other forges, you just need to replace `GithubService` with `PagureService`.
## Supported functionality
For more info on functionality that _is not_ supported in all services the same way
see [compatibility tables](COMPATIBILITY.md).
## Installation
On Fedora:
```
$ dnf install python3-ogr
```
You can also use our [`packit-releases` Copr repository](https://copr.fedorainfracloud.org/coprs/packit/packit-releases/)
(contains also released versions of [OGR](https://github.com/packit/ogr)):
```
$ dnf copr enable packit/packit-releases
$ dnf install python3-ogr
```
Or from PyPI:
```
$ pip3 install --user ogr
```
You can also install OGR from the `main` branch, if you are brave enough:
You can use our [`packit-dev` Copr repository](https://copr.fedorainfracloud.org/coprs/packit/packit-dev/)
(contains the latest development version of [ogr](https://github.com/packit/ogr)):
```
$ dnf copr enable packit/packit-dev
$ dnf install python3-ogr
```
Or
```
$ pip3 install --user git+https://github.com/packit/ogr.git
```
## Requirements
### Makefile
- [podman](https://github.com/containers/libpod)
- [ansible-bender](https://pypi.org/project/ansible-bender)
### Tests
Make sure to install prerequisite packages before first `make check`,
`make build`, or `make check-in-container`. See CONTRIBUTING.md for
details.
# Contribution notes
- Property should not connect to network.
# Contribution guidelines
For more info about contributing to our project see [our contribution guide](/CONTRIBUTING.md).
# Deprecation policy
For more info about deprecation policy see [Deprecation policy](https://github.com/packit/research/tree/main/deprecation)
Raw data
{
"_id": null,
"home_page": null,
"name": "ogr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "api, git, github, gitlab, pagure",
"author": null,
"author_email": "Red Hat <user-cont-team@redhat.com>",
"download_url": "https://files.pythonhosted.org/packages/c6/5f/8183a86ff12c480f5c3773ad2984564926bde59eb52885e50fb47834d4a8/ogr-0.56.0.tar.gz",
"platform": null,
"description": "# One Git library to Rule\n\n\n\n\n\n[](https://softwarefactory-project.io/zuul/t/local/builds?project=packit-service/ogr)\n[](https://github.com/psf/black)\n[](https://github.com/pre-commit/pre-commit)\n\nLibrary for one API for many git forges. (e.g. GitHub, GitLab, Pagure).\n\n## Currently supported git forges:\n\n- GitHub\n- GitLab\n- Pagure\n\n## To start using ogr:\n\nSee [Documentation of Index of Sub-modules, Functions & Classes](https://packit.github.io/ogr)\n\nFor examples of how to use `ogr` see [Jupyter examples](examples).\n\n### GitHub\n\nThis snippet shows how to obtain all releases for certain GitHub project using ogr.\n\n```python\nfrom ogr.services.github import GithubService\n\nservice = GithubService(token=\"your_token\")\n\nogr_project = service.get_project(\n repo=\"ogr\",\n namespace=\"packit-service\"\n)\n\nogr_releases = ogr_project.get_releases()\n\n\nfor release in ogr_releases:\n print(release.tag_name)\n```\n\nThis will output:\n\n```\n0.7.0\n0.6.0\n0.5.0\n0.4.0\n0.3.1\n0.3.0\n0.2.0\n0.1.0\n0.0.3\n0.0.2\n0.0.1\n```\n\nYou can use the same API for other forges, you just need to replace `GithubService` with `PagureService`.\n\n## Supported functionality\n\nFor more info on functionality that _is not_ supported in all services the same way\nsee [compatibility tables](COMPATIBILITY.md).\n\n## Installation\n\nOn Fedora:\n\n```\n$ dnf install python3-ogr\n```\n\nYou can also use our [`packit-releases` Copr repository](https://copr.fedorainfracloud.org/coprs/packit/packit-releases/)\n(contains also released versions of [OGR](https://github.com/packit/ogr)):\n\n```\n$ dnf copr enable packit/packit-releases\n$ dnf install python3-ogr\n```\n\nOr from PyPI:\n\n```\n$ pip3 install --user ogr\n```\n\nYou can also install OGR from the `main` branch, if you are brave enough:\n\nYou can use our [`packit-dev` Copr repository](https://copr.fedorainfracloud.org/coprs/packit/packit-dev/)\n(contains the latest development version of [ogr](https://github.com/packit/ogr)):\n\n```\n$ dnf copr enable packit/packit-dev\n$ dnf install python3-ogr\n```\n\nOr\n\n```\n$ pip3 install --user git+https://github.com/packit/ogr.git\n```\n\n## Requirements\n\n### Makefile\n\n- [podman](https://github.com/containers/libpod)\n- [ansible-bender](https://pypi.org/project/ansible-bender)\n\n### Tests\n\nMake sure to install prerequisite packages before first `make check`,\n`make build`, or `make check-in-container`. See CONTRIBUTING.md for\ndetails.\n\n# Contribution notes\n\n- Property should not connect to network.\n\n# Contribution guidelines\n\nFor more info about contributing to our project see [our contribution guide](/CONTRIBUTING.md).\n\n# Deprecation policy\n\nFor more info about deprecation policy see [Deprecation policy](https://github.com/packit/research/tree/main/deprecation)\n",
"bugtrack_url": null,
"license": null,
"summary": "One API for multiple git forges.",
"version": "0.56.0",
"project_urls": {
"Homepage": "https://github.com/packit/ogr"
},
"split_keywords": [
"api",
" git",
" github",
" gitlab",
" pagure"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "257c11a8da2d64f6ea508b9acaa88acb5101fe997cce7bdd6a8c428d4226df3c",
"md5": "efbb3dee1f40eec800b30e7cdd003574",
"sha256": "8c908aa4be7ad7c4885bcdab4a4d80bfe65697117b5dac8fb5c09e5508f74010"
},
"downloads": -1,
"filename": "ogr-0.56.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "efbb3dee1f40eec800b30e7cdd003574",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 105202,
"upload_time": "2025-08-20T10:17:42",
"upload_time_iso_8601": "2025-08-20T10:17:42.784462Z",
"url": "https://files.pythonhosted.org/packages/25/7c/11a8da2d64f6ea508b9acaa88acb5101fe997cce7bdd6a8c428d4226df3c/ogr-0.56.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c65f8183a86ff12c480f5c3773ad2984564926bde59eb52885e50fb47834d4a8",
"md5": "a5791044cf2256ed34ae97473b77e6d3",
"sha256": "7e751dcef7632f3ca2b1c5d9cfb43b3cc20be72ac7cc2695e7a2acaa25c0858c"
},
"downloads": -1,
"filename": "ogr-0.56.0.tar.gz",
"has_sig": false,
"md5_digest": "a5791044cf2256ed34ae97473b77e6d3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4869240,
"upload_time": "2025-08-20T10:17:44",
"upload_time_iso_8601": "2025-08-20T10:17:44.517040Z",
"url": "https://files.pythonhosted.org/packages/c6/5f/8183a86ff12c480f5c3773ad2984564926bde59eb52885e50fb47834d4a8/ogr-0.56.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-20 10:17:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "packit",
"github_project": "ogr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "ogr"
}