ogr


Nameogr JSON
Version 0.49.2 PyPI version JSON
download
home_page
SummaryOne API for multiple git forges.
upload_time2024-03-08 12:07:40
maintainer
docs_urlNone
author
requires_python>=3.9
license
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": "",
    "name": "ogr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "api,git,github,gitlab,pagure",
    "author": "",
    "author_email": "Red Hat <user-cont-team@redhat.com>",
    "download_url": "https://files.pythonhosted.org/packages/68/f8/00f9f0761fa2ec83970cc99b3586f1ea1397d7d8e37f87f4a4b205084e14/ogr-0.49.2.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": "",
    "summary": "One API for multiple git forges.",
    "version": "0.49.2",
    "project_urls": {
        "Homepage": "https://github.com/packit/ogr"
    },
    "split_keywords": [
        "api",
        "git",
        "github",
        "gitlab",
        "pagure"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44f432834049848b1d200367d9de9f67948a7f4f5fede54ffe458574430fb3e1",
                "md5": "d593bdfc79381a698d289a55ada86385",
                "sha256": "55290315848325e7df98884139d10d31c922cdd7879473ea5d438a7f5c448b28"
            },
            "downloads": -1,
            "filename": "ogr-0.49.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d593bdfc79381a698d289a55ada86385",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 81212,
            "upload_time": "2024-03-08T12:07:36",
            "upload_time_iso_8601": "2024-03-08T12:07:36.760745Z",
            "url": "https://files.pythonhosted.org/packages/44/f4/32834049848b1d200367d9de9f67948a7f4f5fede54ffe458574430fb3e1/ogr-0.49.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68f800f9f0761fa2ec83970cc99b3586f1ea1397d7d8e37f87f4a4b205084e14",
                "md5": "155eddb1b073d425b50d9d3ffd9b3992",
                "sha256": "eaf2787871fadca94226b8f7c4d9eb228e70bcbc92247991a794033f23aeb594"
            },
            "downloads": -1,
            "filename": "ogr-0.49.2.tar.gz",
            "has_sig": false,
            "md5_digest": "155eddb1b073d425b50d9d3ffd9b3992",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3907275,
            "upload_time": "2024-03-08T12:07:40",
            "upload_time_iso_8601": "2024-03-08T12:07:40.824738Z",
            "url": "https://files.pythonhosted.org/packages/68/f8/00f9f0761fa2ec83970cc99b3586f1ea1397d7d8e37f87f4a4b205084e14/ogr-0.49.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-08 12:07:40",
    "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"
}
        
Elapsed time: 0.19772s