![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/banners/softbutterfly-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 SoftButterfly to automate common New Relic One
observability platform tasks
## Requirements
* Python 3.8.1 or higher
* `enforce-typing`
* `python-dotenv`
* `requests`
* `semver`
* `sgqlc`
## 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()
operation = operation.__to_graphql__()
response = newrelic.execute(operation)
print_response(response)
# Output
# {
# "data": {
# "actor": {
# "user": {
# "email": "admin@example.com",
# "id": 1234567890,
# "name": "Admin User",
# }
# }
# }
# }
```
## Docs
* [Ejemplos](https://gitlab.com/softbutterfly/open-source/newrelic-playground)
* [Wiki](https://softbutterfly.gitlab.io/open-source/newrelic-sb-sdk/)
## 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://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/-/graphs/develop).
## 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://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk",
"name": "newrelic-sb-sdk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9.0,<4.0.0",
"maintainer_email": "",
"keywords": "Softbutterfly,New Relic,SDK",
"author": "SoftButterfly Development Team",
"author_email": "dev@softbutterfly.io",
"download_url": "https://files.pythonhosted.org/packages/d1/7b/ca17d71a9ceef97f62185ad16e479771040043a57169b44c770d3ba6e4a4/newrelic_sb_sdk-0.18.0.tar.gz",
"platform": null,
"description": "![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/banners/softbutterfly-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 SoftButterfly to automate common New Relic One\nobservability platform tasks\n\n## Requirements\n\n* Python 3.8.1 or higher\n* `enforce-typing`\n* `python-dotenv`\n* `requests`\n* `semver`\n* `sgqlc`\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\noperation = operation.__to_graphql__()\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* [Ejemplos](https://gitlab.com/softbutterfly/open-source/newrelic-playground)\n* [Wiki](https://softbutterfly.gitlab.io/open-source/newrelic-sb-sdk/)\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://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/-/graphs/develop).\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.18.0",
"project_urls": {
"Bug Tracker": "https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/-/issues",
"Documentation": "https://softbutterfly.gitlab.io/open-source/newrelic-sb-sdk/",
"Download": "https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk/-/archive/v0.18.0/newrelic-sb-sdk-v0.18.0.tar.gz",
"Homepage": "https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk",
"Repository": "https://gitlab.com/softbutterfly/open-source/newrelic-sb-sdk"
},
"split_keywords": [
"softbutterfly",
"new relic",
"sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "09559432888ddece9ee9e2d82ac59ea7ae42772ce1ea416b77c16b63b3e1e52b",
"md5": "2686f95b1e9abfda8d29c17b76e58117",
"sha256": "b16e06f7dcc1de496cc6a76216a89f8e6da0566e0394b7f76f316fda82b29ca5"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.18.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2686f95b1e9abfda8d29c17b76e58117",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0,<4.0.0",
"size": 160809,
"upload_time": "2024-02-05T00:35:15",
"upload_time_iso_8601": "2024-02-05T00:35:15.278153Z",
"url": "https://files.pythonhosted.org/packages/09/55/9432888ddece9ee9e2d82ac59ea7ae42772ce1ea416b77c16b63b3e1e52b/newrelic_sb_sdk-0.18.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d17bca17d71a9ceef97f62185ad16e479771040043a57169b44c770d3ba6e4a4",
"md5": "125d1bd86b183683a9f7394038f15891",
"sha256": "f35290d7b1d4828ac618c39081eb629750166c750542cad96ac1569dd8ea93c2"
},
"downloads": -1,
"filename": "newrelic_sb_sdk-0.18.0.tar.gz",
"has_sig": false,
"md5_digest": "125d1bd86b183683a9f7394038f15891",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0,<4.0.0",
"size": 154181,
"upload_time": "2024-02-05T00:35:17",
"upload_time_iso_8601": "2024-02-05T00:35:17.783748Z",
"url": "https://files.pythonhosted.org/packages/d1/7b/ca17d71a9ceef97f62185ad16e479771040043a57169b44c770d3ba6e4a4/newrelic_sb_sdk-0.18.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-05 00:35:17",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "softbutterfly",
"gitlab_project": "open-source",
"lcname": "newrelic-sb-sdk"
}