![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/assets/dynova/dynova-open-source--banner--community-project.png)
![PyPI - Supported versions](https://img.shields.io/pypi/pyversions/newrelic-sb-sdk)
![PyPI - Package version](https://img.shields.io/pypi/v/newrelic-sb-sdk)
![PyPI - Downloads](https://img.shields.io/pypi/dm/newrelic-sb-sdk)
![PyPI - MIT License](https://img.shields.io/pypi/l/newrelic-sb-sdk)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1c25dec51e1c4a719be4c2d4ebe7eef6)](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/1c25dec51e1c4a719be4c2d4ebe7eef6)](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
[![pipeline status](https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/badges/master/pipeline.svg)](https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/-/commits/master)
# New Relic SB SDK
New Relic SDK built by Dynova to automate common SRE tasks with New Relic API.
## Requirements
* Python 3.9.0 or higher
## Install
Install from PyPI
```bash
pip install newrelic-sb-sdk
```
## Usage
There is an example on how to use this module to make a simple requesto to New
Relic GraphQL API.
```python
from newrelic_sb_sdk.client import NewRelicGqlClient
from newrelic_sb_sdk.utils.response import print_response
from newrelic_sb_sdk.graphql import nerdgraph
from newrelic_sb_sdk.graphql.objects import RootQueryType, RootMutationType
from sgqlc.operation import Operation
nerdgraph.query_type = RootQueryType
nerdgraph.mutation_type = RootMutationType
newrelic = NewRelicGqlClient(new_relic_user_key=YOUR_NEW_RELIC_USER_KEY)
operation = Operation(nerdgraph.query_type)
operation.actor.user()
response = newrelic.execute(operation)
print_response(response)
# Output
# {
# "data": {
# "actor": {
# "user": {
# "email": "admin@example.com",
# "id": 1234567890,
# "name": "Admin User",
# }
# }
# }
# }
```
## Docs
* [Documentación](https://dynovaio.github.io/newrelic-sb-sdk)
* [Ejemplos](https://gitlab.com/softbutterfly/open-source/newrelic-playground)
## Changelog
All changes to versions of this library are listed in the [change history](./CHANGELOG.md).
## Development
Check out our [contribution guide](./CONTRIBUTING.md).
## Contributors
See the list of contributors [here](https://github.com/dynovaio/newrelic-sb-sdk/graphs/contributors).
## License
This project is licensed under the terms of the MIT license. See the
<a href="./LICENSE.txt" download>LICENSE</a> file.
Raw data
{
"_id": null,
"home_page": "https://github.com/dynovaio/newrelic-sb-sdk",
"name": "newrelic-sb-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.9.0",
"maintainer_email": null,
"keywords": "Softbutterfly, New Relic, SDK",
"author": "SoftButterfly Development Team",
"author_email": "dev@softbutterfly.io",
"download_url": "https://files.pythonhosted.org/packages/b1/d5/5f28804ad59879f4e730ee7c6e1543487fdc763956913c4cc3151347a1c2/newrelic_sb_sdk-0.25.0.tar.gz",
"platform": null,
"description": "![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/assets/dynova/dynova-open-source--banner--community-project.png)\n\n![PyPI - Supported versions](https://img.shields.io/pypi/pyversions/newrelic-sb-sdk)\n![PyPI - Package version](https://img.shields.io/pypi/v/newrelic-sb-sdk)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/newrelic-sb-sdk)\n![PyPI - MIT License](https://img.shields.io/pypi/l/newrelic-sb-sdk)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1c25dec51e1c4a719be4c2d4ebe7eef6)](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/1c25dec51e1c4a719be4c2d4ebe7eef6)](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)\n[![pipeline status](https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/badges/master/pipeline.svg)](https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/-/commits/master)\n\n# New Relic SB SDK\n\nNew Relic SDK built by Dynova to automate common SRE tasks with New Relic API.\n\n## Requirements\n\n* Python 3.9.0 or higher\n\n## Install\n\nInstall from PyPI\n\n```bash\npip install newrelic-sb-sdk\n```\n\n## Usage\n\nThere is an example on how to use this module to make a simple requesto to New\nRelic GraphQL API.\n\n```python\nfrom newrelic_sb_sdk.client import NewRelicGqlClient\nfrom newrelic_sb_sdk.utils.response import print_response\nfrom newrelic_sb_sdk.graphql import nerdgraph\nfrom newrelic_sb_sdk.graphql.objects import RootQueryType, RootMutationType\n\nfrom sgqlc.operation import Operation\n\nnerdgraph.query_type = RootQueryType\nnerdgraph.mutation_type = RootMutationType\n\nnewrelic = NewRelicGqlClient(new_relic_user_key=YOUR_NEW_RELIC_USER_KEY)\n\noperation = Operation(nerdgraph.query_type)\noperation.actor.user()\n\nresponse = newrelic.execute(operation)\n\nprint_response(response)\n\n# Output\n# {\n# \"data\": {\n# \"actor\": {\n# \"user\": {\n# \"email\": \"admin@example.com\",\n# \"id\": 1234567890,\n# \"name\": \"Admin User\",\n# }\n# }\n# }\n# }\n```\n\n## Docs\n\n* [Documentaci\u00f3n](https://dynovaio.github.io/newrelic-sb-sdk)\n* [Ejemplos](https://gitlab.com/softbutterfly/open-source/newrelic-playground)\n\n## Changelog\n\nAll changes to versions of this library are listed in the [change history](./CHANGELOG.md).\n\n## Development\n\nCheck out our [contribution guide](./CONTRIBUTING.md).\n\n## Contributors\n\nSee the list of contributors [here](https://github.com/dynovaio/newrelic-sb-sdk/graphs/contributors).\n\n## License\n\nThis project is licensed under the terms of the MIT license. See the\n<a href=\"./LICENSE.txt\" download>LICENSE</a> file.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "New Relic SDK to interact with Nerdgraph API.",
"version": "0.25.0",
"project_urls": {
"Bug Tracker": "https://github.com/dynovaio/newrelic-sb-sdk/issues",
"Documentation": "https://dynovaio.github.io/newrelic-sb-sdk",
"Download": "https://github.com/dynovaio/newrelic-sb-sdk/archive/refs/tags/v0.25.0.zip",
"Homepage": "https://github.com/dynovaio/newrelic-sb-sdk",
"Repository": "https://github.com/dynovaio/newrelic-sb-sdk"
},
"split_keywords": [
"softbutterfly",
" new relic",
" sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "800e10e5d3ac5d65564a81b4baedb5be6b25f9c0fe59058f7694dded483754b6",
"md5": "0b799687ac5ae81a16a9c7d8c8925e85",
"sha256": "efb88a3d9ef1fae86873ce79ad3bdb309e5abff51498300d8d5712907079f1e2"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.25.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0b799687ac5ae81a16a9c7d8c8925e85",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.0",
"size": 175728,
"upload_time": "2024-12-07T18:16:13",
"upload_time_iso_8601": "2024-12-07T18:16:13.001017Z",
"url": "https://files.pythonhosted.org/packages/80/0e/10e5d3ac5d65564a81b4baedb5be6b25f9c0fe59058f7694dded483754b6/newrelic_sb_sdk-0.25.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b1d55f28804ad59879f4e730ee7c6e1543487fdc763956913c4cc3151347a1c2",
"md5": "00af35bacfe8112be295a81c0aaec75c",
"sha256": "10e08b830547f3d76b346eb5b9c6a2f3a4bc546e3ce3a9457e7712848a57d193"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.25.0.tar.gz",
"has_sig": false,
"md5_digest": "00af35bacfe8112be295a81c0aaec75c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.0",
"size": 171067,
"upload_time": "2024-12-07T18:16:14",
"upload_time_iso_8601": "2024-12-07T18:16:14.809882Z",
"url": "https://files.pythonhosted.org/packages/b1/d5/5f28804ad59879f4e730ee7c6e1543487fdc763956913c4cc3151347a1c2/newrelic_sb_sdk-0.25.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-07 18:16:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dynovaio",
"github_project": "newrelic-sb-sdk",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "certifi",
"specs": [
[
"==",
"2024.8.30"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"3.4.0"
]
]
},
{
"name": "graphql-core",
"specs": [
[
"==",
"3.2.5"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.10"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "sgqlc",
"specs": [
[
"==",
"16.3"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.12.2"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"2.2.3"
]
]
}
],
"lcname": "newrelic-sb-sdk"
}