ci-info


Nameci-info JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/mgxd/ci-info
SummaryContinuous Integration Information
upload_time2022-07-27 17:22:49
maintainer
docs_urlNone
authorMathias Goncalves
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # ci-info

[![PyPI version](https://badge.fury.io/py/ci-info.svg)](https://badge.fury.io/py/ci-info)
[![Build Status](https://travis-ci.org/mgxd/ci-info.svg?branch=master)](https://travis-ci.org/mgxd/ci-info)

A Python implementation of [watson/ci-info](https://github.com/watson/ci-info).
Get details about the current Continuous Integration environment.

Please [open an issue](https://github.com/mgxd/ci-info/issues/new)
if your CI server isn't properly detected :)


## Supported CI tools

Officially supported CI servers:

| Name                                                                            | isPR |
| ------------------------------------------------------------------------------- | ---- |
| [AWS CodeBuild](https://aws.amazon.com/codebuild/)                              | 🚫   |
| [AppVeyor](http://www.appveyor.com)                                             | ✅   |
| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | ✅   |
| [Appcircle](https://appcircle.io/)                                              | 🚫   |
| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian                | 🚫   |
| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines)         | ✅   |
| [Bitrise](https://www.bitrise.io/)                                              | ✅   |
| [Buddy](https://buddy.works/)                                                   | ✅   |
| [Buildkite](https://buildkite.com)                                              | ✅   |
| [CircleCI](http://circleci.com)                                                 | ✅   |
| [Cirrus CI](https://cirrus-ci.org)                                              | ✅   |
| [Codefresh](https://codefresh.io/)                                              | ✅   |
| [Codeship](https://codeship.com)                                                | 🚫   |
| [Drone](https://drone.io)                                                       | ✅   |
| [dsari](https://github.com/rfinnie/dsari)                                       | 🚫   |
| [Expo Application Services](https://expo.dev/eas)                               | 🚫   |
| [GitHub Actions](https://github.com/features/actions/)                          | ✅   |
| [GitLab CI](https://about.gitlab.com/gitlab-ci/)                                | ✅   |
| [GoCD](https://www.go.cd/)                                                      | 🚫   |
| [Hudson](http://hudson-ci.org)                                                  | 🚫   |
| [Jenkins CI](https://jenkins-ci.org)                                            | ✅   |
| [LayerCI](https://layerci.com/)                                                 | ✅   |
| [Magnum CI](https://magnum-ci.com)                                              | 🚫   |
| [Netlify CI](https://www.netlify.com/)                                          | ✅   |
| [Nevercode](http://nevercode.io/)                                               | ✅   |
| [Render](https://render.com/)                                                   | ✅   |
| [Sail CI](https://sail.ci/)                                                     | ✅   |
| [Screwdriver](https://screwdriver.cd/)                                          | ✅   |
| [Semaphore](https://semaphoreci.com)                                            | ✅   |
| [Shippable](https://www.shippable.com/)                                         | ✅   |
| [Solano CI](https://www.solanolabs.com/)                                        | ✅   |
| [Strider CD](https://strider-cd.github.io/)                                     | 🚫   |
| [TaskCluster](http://docs.taskcluster.net)                                      | 🚫   |
| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains                    | 🚫   |
| [Travis CI](http://travis-ci.org)                                               | ✅   |
| [Vercel](https://vercel.com/)                                                   | 🚫   |
| [Visual Studio App Center](https://appcenter.ms/)                               | 🚫   |


## Installation

```
pip install ci-info
```

## Usage

```python
import ci_info
if ci_info.is_ci():
    print(ci_info.name())

"My CI Name"
```


## API

### `ci_info.name()`

Returns a string containing name of the CI server the code is running on.
If CI server is not detected, it returns `None`.

Don't depend on the value of this string not to change for a specific
vendor.

### `ci_info.is_ci()`

Returns a boolean. Will be `True` if the code is running on a CI server,
otherwise `False`.

Some CI servers not listed here might still trigger the `ci_info.is_ci()`
boolean to be set to `True` if they use certain vendor neutral
environment variables. In those cases `ci_info.name()` will be `None` and no
vendor specific boolean will be set to `True`.

### `ci_info.is_pr()`

Returns a boolean if PR detection is supported for the current CI server. Will
be `True` if a PR is being tested, otherwise `False`. If PR detection is
not supported for the current CI server, the value will be `None`.

### `ci_info.info()`

Returns a dictionary of all above values in key/value pairs.

## License

[MIT](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mgxd/ci-info",
    "name": "ci-info",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mathias Goncalves",
    "author_email": "mathiasg@mit.edu",
    "download_url": "https://files.pythonhosted.org/packages/11/27/938d6ef93df09c686dcee1c7334578274320e98e7bf912a6409cf2c8c3e5/ci-info-0.3.0.tar.gz",
    "platform": null,
    "description": "# ci-info\n\n[![PyPI version](https://badge.fury.io/py/ci-info.svg)](https://badge.fury.io/py/ci-info)\n[![Build Status](https://travis-ci.org/mgxd/ci-info.svg?branch=master)](https://travis-ci.org/mgxd/ci-info)\n\nA Python implementation of [watson/ci-info](https://github.com/watson/ci-info).\nGet details about the current Continuous Integration environment.\n\nPlease [open an issue](https://github.com/mgxd/ci-info/issues/new)\nif your CI server isn't properly detected :)\n\n\n## Supported CI tools\n\nOfficially supported CI servers:\n\n| Name                                                                            | isPR |\n| ------------------------------------------------------------------------------- | ---- |\n| [AWS CodeBuild](https://aws.amazon.com/codebuild/)                              | \ud83d\udeab   |\n| [AppVeyor](http://www.appveyor.com)                                             | \u2705   |\n| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | \u2705   |\n| [Appcircle](https://appcircle.io/)                                              | \ud83d\udeab   |\n| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian                | \ud83d\udeab   |\n| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines)         | \u2705   |\n| [Bitrise](https://www.bitrise.io/)                                              | \u2705   |\n| [Buddy](https://buddy.works/)                                                   | \u2705   |\n| [Buildkite](https://buildkite.com)                                              | \u2705   |\n| [CircleCI](http://circleci.com)                                                 | \u2705   |\n| [Cirrus CI](https://cirrus-ci.org)                                              | \u2705   |\n| [Codefresh](https://codefresh.io/)                                              | \u2705   |\n| [Codeship](https://codeship.com)                                                | \ud83d\udeab   |\n| [Drone](https://drone.io)                                                       | \u2705   |\n| [dsari](https://github.com/rfinnie/dsari)                                       | \ud83d\udeab   |\n| [Expo Application Services](https://expo.dev/eas)                               | \ud83d\udeab   |\n| [GitHub Actions](https://github.com/features/actions/)                          | \u2705   |\n| [GitLab CI](https://about.gitlab.com/gitlab-ci/)                                | \u2705   |\n| [GoCD](https://www.go.cd/)                                                      | \ud83d\udeab   |\n| [Hudson](http://hudson-ci.org)                                                  | \ud83d\udeab   |\n| [Jenkins CI](https://jenkins-ci.org)                                            | \u2705   |\n| [LayerCI](https://layerci.com/)                                                 | \u2705   |\n| [Magnum CI](https://magnum-ci.com)                                              | \ud83d\udeab   |\n| [Netlify CI](https://www.netlify.com/)                                          | \u2705   |\n| [Nevercode](http://nevercode.io/)                                               | \u2705   |\n| [Render](https://render.com/)                                                   | \u2705   |\n| [Sail CI](https://sail.ci/)                                                     | \u2705   |\n| [Screwdriver](https://screwdriver.cd/)                                          | \u2705   |\n| [Semaphore](https://semaphoreci.com)                                            | \u2705   |\n| [Shippable](https://www.shippable.com/)                                         | \u2705   |\n| [Solano CI](https://www.solanolabs.com/)                                        | \u2705   |\n| [Strider CD](https://strider-cd.github.io/)                                     | \ud83d\udeab   |\n| [TaskCluster](http://docs.taskcluster.net)                                      | \ud83d\udeab   |\n| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains                    | \ud83d\udeab   |\n| [Travis CI](http://travis-ci.org)                                               | \u2705   |\n| [Vercel](https://vercel.com/)                                                   | \ud83d\udeab   |\n| [Visual Studio App Center](https://appcenter.ms/)                               | \ud83d\udeab   |\n\n\n## Installation\n\n```\npip install ci-info\n```\n\n## Usage\n\n```python\nimport ci_info\nif ci_info.is_ci():\n    print(ci_info.name())\n\n\"My CI Name\"\n```\n\n\n## API\n\n### `ci_info.name()`\n\nReturns a string containing name of the CI server the code is running on.\nIf CI server is not detected, it returns `None`.\n\nDon't depend on the value of this string not to change for a specific\nvendor.\n\n### `ci_info.is_ci()`\n\nReturns a boolean. Will be `True` if the code is running on a CI server,\notherwise `False`.\n\nSome CI servers not listed here might still trigger the `ci_info.is_ci()`\nboolean to be set to `True` if they use certain vendor neutral\nenvironment variables. In those cases `ci_info.name()` will be `None` and no\nvendor specific boolean will be set to `True`.\n\n### `ci_info.is_pr()`\n\nReturns a boolean if PR detection is supported for the current CI server. Will\nbe `True` if a PR is being tested, otherwise `False`. If PR detection is\nnot supported for the current CI server, the value will be `None`.\n\n### `ci_info.info()`\n\nReturns a dictionary of all above values in key/value pairs.\n\n## License\n\n[MIT](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Continuous Integration Information",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/mgxd/ci-info"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13c38ac768b389d5b6dda1c3ce7992b3acd2b46401f9b71439123858b17b1a2c",
                "md5": "2f21431599a7b88e7e03841cd236e66b",
                "sha256": "e9e05d262a6c48aa03cd904475de5ce8c4da8a5435e516631c795d0487dc9e07"
            },
            "downloads": -1,
            "filename": "ci_info-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2f21431599a7b88e7e03841cd236e66b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7764,
            "upload_time": "2022-07-27T17:22:47",
            "upload_time_iso_8601": "2022-07-27T17:22:47.196313Z",
            "url": "https://files.pythonhosted.org/packages/13/c3/8ac768b389d5b6dda1c3ce7992b3acd2b46401f9b71439123858b17b1a2c/ci_info-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1127938d6ef93df09c686dcee1c7334578274320e98e7bf912a6409cf2c8c3e5",
                "md5": "cb89a65d7087d9b731de51f5e7d6178c",
                "sha256": "1fd50cbd401f29adffeeb18b0489e232d16ac1a7458ac6bc316deab6ae535fb0"
            },
            "downloads": -1,
            "filename": "ci-info-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cb89a65d7087d9b731de51f5e7d6178c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 25169,
            "upload_time": "2022-07-27T17:22:49",
            "upload_time_iso_8601": "2022-07-27T17:22:49.365996Z",
            "url": "https://files.pythonhosted.org/packages/11/27/938d6ef93df09c686dcee1c7334578274320e98e7bf912a6409cf2c8c3e5/ci-info-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-27 17:22:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mgxd",
    "github_project": "ci-info",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "ci-info"
}
        
Elapsed time: 0.08218s