




[](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/3b/ec/cbb5d02f892f8d3eb4463eeed4ff70dcc04b2123fc0cd9fd61f0959266fb/newrelic_sb_sdk-0.38.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.38.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.38.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": "6e570d310ca0c2153e01568c8bf072df59f13a1a15891dc6b9de8a8b2f856096",
"md5": "b0d6b6c44afa7cc63e0241c35561dea3",
"sha256": "6f7794a3f8721abd725c6a38629b6b3c41c6ac98ad4efd3c7d6bc519e5b1e46b"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.38.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b0d6b6c44afa7cc63e0241c35561dea3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.0",
"size": 206165,
"upload_time": "2025-08-28T07:51:03",
"upload_time_iso_8601": "2025-08-28T07:51:03.646039Z",
"url": "https://files.pythonhosted.org/packages/6e/57/0d310ca0c2153e01568c8bf072df59f13a1a15891dc6b9de8a8b2f856096/newrelic_sb_sdk-0.38.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3beccbb5d02f892f8d3eb4463eeed4ff70dcc04b2123fc0cd9fd61f0959266fb",
"md5": "e850bdd0a01c0109612cf46ac157968a",
"sha256": "76ec966044fa65bcfffff9da62084279e4ccd7499fee32c0ffc4c7a1cc5ae57d"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.38.0.tar.gz",
"has_sig": false,
"md5_digest": "e850bdd0a01c0109612cf46ac157968a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.0",
"size": 210627,
"upload_time": "2025-08-28T07:51:05",
"upload_time_iso_8601": "2025-08-28T07:51:05.576051Z",
"url": "https://files.pythonhosted.org/packages/3b/ec/cbb5d02f892f8d3eb4463eeed4ff70dcc04b2123fc0cd9fd61f0959266fb/newrelic_sb_sdk-0.38.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 07:51:05",
"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"
}