Name | ogr JSON |
Version |
0.50.3
JSON |
| download |
home_page | None |
Summary | One API for multiple git forges. |
upload_time | 2025-01-10 14:09:22 |
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
![PyPI](https://img.shields.io/pypi/v/ogr.svg)
![PyPI - License](https://img.shields.io/pypi/l/ogr.svg)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ogr.svg)
![PyPI - Status](https://img.shields.io/pypi/status/ogr.svg)
[![Build Status](https://zuul-ci.org/gated.svg)](https://softwarefactory-project.io/zuul/t/local/builds?project=packit-service/ogr)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](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/ea/d5/690178bce66805ab245302c2d210c867ce03e11506029c1a9d713b3465c5/ogr-0.50.3.tar.gz",
"platform": null,
"description": "# One Git library to Rule\n\n![PyPI](https://img.shields.io/pypi/v/ogr.svg)\n![PyPI - License](https://img.shields.io/pypi/l/ogr.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ogr.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/ogr.svg)\n[![Build Status](https://zuul-ci.org/gated.svg)](https://softwarefactory-project.io/zuul/t/local/builds?project=packit-service/ogr)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](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.50.3",
"project_urls": {
"Homepage": "https://github.com/packit/ogr"
},
"split_keywords": [
"api",
" git",
" github",
" gitlab",
" pagure"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "507334899fcb4ee8f19381dd3b8859275e3469cd19c858ca06c1fef4cc8e4145",
"md5": "92cbfd6f75b60e7bc1fd1291816cd078",
"sha256": "b815acaba372cb3d6cf1e282d1a4697448d715e3cd93dcfaf6cccd074e9bdb7a"
},
"downloads": -1,
"filename": "ogr-0.50.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "92cbfd6f75b60e7bc1fd1291816cd078",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 82063,
"upload_time": "2025-01-10T14:09:20",
"upload_time_iso_8601": "2025-01-10T14:09:20.817210Z",
"url": "https://files.pythonhosted.org/packages/50/73/34899fcb4ee8f19381dd3b8859275e3469cd19c858ca06c1fef4cc8e4145/ogr-0.50.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ead5690178bce66805ab245302c2d210c867ce03e11506029c1a9d713b3465c5",
"md5": "af41ba36658ed2d5455c4e965cfcddd5",
"sha256": "cd9f5358b38c4392ee4d809ef5b9aba54f704ce439e5407a6f1584118cbe2b50"
},
"downloads": -1,
"filename": "ogr-0.50.3.tar.gz",
"has_sig": false,
"md5_digest": "af41ba36658ed2d5455c4e965cfcddd5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4857925,
"upload_time": "2025-01-10T14:09:22",
"upload_time_iso_8601": "2025-01-10T14:09:22.476240Z",
"url": "https://files.pythonhosted.org/packages/ea/d5/690178bce66805ab245302c2d210c867ce03e11506029c1a9d713b3465c5/ogr-0.50.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-10 14:09:22",
"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"
}