




[](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
[](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/9d/07/375c94e51b79ea9a30dcdc830096fe5ab0cd6fdd89fb25c6defdc7f530d7/newrelic_sb_sdk-0.29.0.tar.gz",
"platform": null,
"description": "\n\n\n\n\n\n\n[](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n[](https://app.codacy.com/gl/softbutterfly/newrelic-sb-sdk/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)\n[](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.29.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.29.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": "83fa3ad63d7572cdb050b7ec12b2f4450a5f460687ae55999895467accd0680d",
"md5": "bcaca59a09a2d0419bc05b3cdd5320ea",
"sha256": "07a73f9c9137ef703b44a0762c59b62325887dfe69823beb91497c0f0390ac25"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.29.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bcaca59a09a2d0419bc05b3cdd5320ea",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.0",
"size": 173922,
"upload_time": "2025-02-10T02:53:10",
"upload_time_iso_8601": "2025-02-10T02:53:10.250545Z",
"url": "https://files.pythonhosted.org/packages/83/fa/3ad63d7572cdb050b7ec12b2f4450a5f460687ae55999895467accd0680d/newrelic_sb_sdk-0.29.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9d07375c94e51b79ea9a30dcdc830096fe5ab0cd6fdd89fb25c6defdc7f530d7",
"md5": "f7a503d14ed22995b7450d1582ae289b",
"sha256": "96654e3e11a4553acf5eebe33e885484fcbc2374b051b9b9cdfac94b4e9fcda3"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.29.0.tar.gz",
"has_sig": false,
"md5_digest": "f7a503d14ed22995b7450d1582ae289b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.0",
"size": 176971,
"upload_time": "2025-02-10T02:53:13",
"upload_time_iso_8601": "2025-02-10T02:53:13.978872Z",
"url": "https://files.pythonhosted.org/packages/9d/07/375c94e51b79ea9a30dcdc830096fe5ab0cd6fdd89fb25c6defdc7f530d7/newrelic_sb_sdk-0.29.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-10 02:53:13",
"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"
}