PyARCrbac


NamePyARCrbac JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA Library that simplifies interaction with Azure / ARC Metadata services.
upload_time2024-12-06 14:38:19
maintainerNone
docs_urlNone
authorikbendion (dblonk)
requires_pythonNone
licenseMIT
keywords python azure rbac azurearc authentication azmanagement
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyARCrbac ![PyPI - Downloads](https://img.shields.io/pypi/dm/pyarcrbac) ![PyPI - Version](https://img.shields.io/pypi/v/pyarcrbac)
PyARCrbac is a Python library that provides functions for retrieving tokens from azure arc-enabled servers using the local metadata service. It can be used to obtain access tokens for Azure resources.
## Installation
```shell
pip3 install pyarcrbac
```
# Usage
Make sure you have the necessary permissions and environment variables set up to access the azure metadata service.
## Graph Tokens
Here's an example of how to use PyARCrbac to retrieve an graph access token:
```python
from pyarcrbac import pyrbac
import requests

def fetch_device_data():
  url = "https://graph.microsoft.com/v1.0/devices"
  headers = {"Authorization": f"Bearer {pyrbac.graph_token()}"}
  response = requests.get(url, headers=headers)
  return response.json()
```
## Azure Management Tokens
Here's an example of how to use PyARCrbac to retrieve an management access token:
```python
from pyarcrbac import pyrbac
import requests

def fetch_device_data():
  url = "https://management.azure.com/subscriptions"
  headers = {"Authorization": f"Bearer {pyrbac.mgmt_token()}"}
  response = requests.get(url, headers=headers)
  return response.json()
```


## Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

## License
This project is licensed under the MIT License.

## Contact
For any questions or inquiries, please open an issue.

## Disclaimer
I am not responsible for any damage and/or misuse as a result of using this lib.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "PyARCrbac",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, azure, rbac, azurearc, authentication, azmanagement",
    "author": "ikbendion (dblonk)",
    "author_email": "<contact@ikbendion.nl>",
    "download_url": "https://files.pythonhosted.org/packages/f6/0d/d42296a4510ebaddeb564f377ffa769f79fb910a14ca38223feaca8ff945/PyARCrbac-1.0.0.tar.gz",
    "platform": null,
    "description": "# PyARCrbac ![PyPI - Downloads](https://img.shields.io/pypi/dm/pyarcrbac) ![PyPI - Version](https://img.shields.io/pypi/v/pyarcrbac)\nPyARCrbac is a Python library that provides functions for retrieving tokens from azure arc-enabled servers using the local metadata service. It can be used to obtain access tokens for Azure resources.\n## Installation\n```shell\npip3 install pyarcrbac\n```\n# Usage\nMake sure you have the necessary permissions and environment variables set up to access the azure metadata service.\n## Graph Tokens\nHere's an example of how to use PyARCrbac to retrieve an graph access token:\n```python\nfrom pyarcrbac import pyrbac\nimport requests\n\ndef fetch_device_data():\n  url = \"https://graph.microsoft.com/v1.0/devices\"\n  headers = {\"Authorization\": f\"Bearer {pyrbac.graph_token()}\"}\n  response = requests.get(url, headers=headers)\n  return response.json()\n```\n## Azure Management Tokens\nHere's an example of how to use PyARCrbac to retrieve an management access token:\n```python\nfrom pyarcrbac import pyrbac\nimport requests\n\ndef fetch_device_data():\n  url = \"https://management.azure.com/subscriptions\"\n  headers = {\"Authorization\": f\"Bearer {pyrbac.mgmt_token()}\"}\n  response = requests.get(url, headers=headers)\n  return response.json()\n```\n\n\n## Contributing\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.\n\n## License\nThis project is licensed under the MIT License.\n\n## Contact\nFor any questions or inquiries, please open an issue.\n\n## Disclaimer\nI am not responsible for any damage and/or misuse as a result of using this lib.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Library that simplifies interaction with Azure / ARC Metadata services.",
    "version": "1.0.0",
    "project_urls": {
        "Source": "https://github.com/ikbendion/PyARCrbac"
    },
    "split_keywords": [
        "python",
        " azure",
        " rbac",
        " azurearc",
        " authentication",
        " azmanagement"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe1cb04bc0f2f21eca8888857c46be22f8ceadccdd085d32033914bb56929261",
                "md5": "644e3755963a50fb4cd86056515b8b0c",
                "sha256": "9e3bce48083e1e059971b5d2f708e9e71e71f9d11556d7c5d09f4751f28b956b"
            },
            "downloads": -1,
            "filename": "PyARCrbac-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "644e3755963a50fb4cd86056515b8b0c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3633,
            "upload_time": "2024-12-06T14:38:19",
            "upload_time_iso_8601": "2024-12-06T14:38:19.062820Z",
            "url": "https://files.pythonhosted.org/packages/fe/1c/b04bc0f2f21eca8888857c46be22f8ceadccdd085d32033914bb56929261/PyARCrbac-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f60dd42296a4510ebaddeb564f377ffa769f79fb910a14ca38223feaca8ff945",
                "md5": "9d9272c51c8e69c05d23870e28c9c422",
                "sha256": "82661c06e084758f7f7b4d8379386e0bc7474fce0117759a6bc25a6eb5b6c9b3"
            },
            "downloads": -1,
            "filename": "PyARCrbac-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9d9272c51c8e69c05d23870e28c9c422",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3365,
            "upload_time": "2024-12-06T14:38:19",
            "upload_time_iso_8601": "2024-12-06T14:38:19.938443Z",
            "url": "https://files.pythonhosted.org/packages/f6/0d/d42296a4510ebaddeb564f377ffa769f79fb910a14ca38223feaca8ff945/PyARCrbac-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-06 14:38:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ikbendion",
    "github_project": "PyARCrbac",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyarcrbac"
}
        
Elapsed time: 0.39840s