prismacloud-api


Nameprismacloud-api JSON
Version 5.2.16 PyPI version JSON
download
home_pagehttps://github.com/PaloAltoNetworks/prismacloud-api-python
SummaryPrisma Cloud API SDK for Python
upload_time2024-04-12 12:46:51
maintainerNone
docs_urlNone
authorTom Kishel
requires_python>=3.6
licenseNone
keywords prisma cloud api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python SDK for the Prisma Cloud APIs

This project includes a Python SDK for the Prisma Cloud APIs (CSPM, CWPP, and CCS) in the form of a Python package.
It also includes reference scripts that utilize this SDK.

Major changes with Version 5.0:

* Command-line argument and configuration file changes.

## Table of Contents

* [Setup](#Setup)
* [Support](#Support)


## Setup

Install the SDK via `pip3`:

```
pip3 install prismacloud-api
```

Please refer to [PyPI](https://pypi.org/project/prismacloud-api) for details.

### Example Scripts

Please refer to this [scripts](https://github.com/PaloAltoNetworks/prismacloud-api-python/tree/main/scripts) directory for configuration, documentation, and usage.

If you prefer to use this SDK without using command-line options, consider these minimal examples:

#### Prisma Cloud Enterprise Edition

```
import os
from prismacloud.api import pc_api

# Settings for Prisma Cloud Enterprise Edition

settings = {
    "url":      "https://api.prismacloud.io/",
    "identity": "access_key",
    "secret":   "secret_key"
}

pc_api.configure(settings)

print('Prisma Cloud API Current User:')
print()
print(pc_api.current_user())
print()
print('Prisma Cloud Compute API Intelligence:')
print()
print(pc_api.statuses_intelligence())
print()

print('Prisma Cloud API Object:')
print()
print(pc_api)
print()
```

#### Prisma Cloud Compute Edition

```
import os
from prismacloud.api import pc_api

# Settings for Prisma Cloud Compute Edition

settings = {
    "url":      "https://console.example.com/",
    "identity": "username",
    "secret":   "password"
}

pc_api.configure(settings)

print('Prisma Cloud Compute API Intelligence:')
print()
print(pc_api.statuses_intelligence())
print()

print('Prisma Cloud API Object:')
print()
print(pc_api)
print()
```

Settings can also be defined as environment variables:

#### Environment Variables

```
settings = {
    "url":      os.environ.get('PC_URL'),
    "identity": os.environ.get('PC_IDENTITY'),
    "secret":   os.environ.get('PC_SECRET')
}
```

## Support

This project has been developed by members of the Prisma Cloud CS and SE teams, it is not Supported by Palo Alto Networks.
Nevertheless, the maintainers will make a best-effort to address issues, and (of course) contributors are encouraged to submit issues and pull requests.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PaloAltoNetworks/prismacloud-api-python",
    "name": "prismacloud-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "prisma cloud api",
    "author": "Tom Kishel",
    "author_email": "tkishel@paloaltonetworks.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/1c/3a56e7fbd17417b56ba5188e021239bb4feb4299602dbd04c1402b9460d2/prismacloud-api-5.2.16.tar.gz",
    "platform": null,
    "description": "# Python SDK for the Prisma Cloud APIs\n\nThis project includes a Python SDK for the Prisma Cloud APIs (CSPM, CWPP, and CCS) in the form of a Python package.\nIt also includes reference scripts that utilize this SDK.\n\nMajor changes with Version 5.0:\n\n* Command-line argument and configuration file changes.\n\n## Table of Contents\n\n* [Setup](#Setup)\n* [Support](#Support)\n\n\n## Setup\n\nInstall the SDK via `pip3`:\n\n```\npip3 install prismacloud-api\n```\n\nPlease refer to [PyPI](https://pypi.org/project/prismacloud-api) for details.\n\n### Example Scripts\n\nPlease refer to this [scripts](https://github.com/PaloAltoNetworks/prismacloud-api-python/tree/main/scripts) directory for configuration, documentation, and usage.\n\nIf you prefer to use this SDK without using command-line options, consider these minimal examples:\n\n#### Prisma Cloud Enterprise Edition\n\n```\nimport os\nfrom prismacloud.api import pc_api\n\n# Settings for Prisma Cloud Enterprise Edition\n\nsettings = {\n    \"url\":      \"https://api.prismacloud.io/\",\n    \"identity\": \"access_key\",\n    \"secret\":   \"secret_key\"\n}\n\npc_api.configure(settings)\n\nprint('Prisma Cloud API Current User:')\nprint()\nprint(pc_api.current_user())\nprint()\nprint('Prisma Cloud Compute API Intelligence:')\nprint()\nprint(pc_api.statuses_intelligence())\nprint()\n\nprint('Prisma Cloud API Object:')\nprint()\nprint(pc_api)\nprint()\n```\n\n#### Prisma Cloud Compute Edition\n\n```\nimport os\nfrom prismacloud.api import pc_api\n\n# Settings for Prisma Cloud Compute Edition\n\nsettings = {\n    \"url\":      \"https://console.example.com/\",\n    \"identity\": \"username\",\n    \"secret\":   \"password\"\n}\n\npc_api.configure(settings)\n\nprint('Prisma Cloud Compute API Intelligence:')\nprint()\nprint(pc_api.statuses_intelligence())\nprint()\n\nprint('Prisma Cloud API Object:')\nprint()\nprint(pc_api)\nprint()\n```\n\nSettings can also be defined as environment variables:\n\n#### Environment Variables\n\n```\nsettings = {\n    \"url\":      os.environ.get('PC_URL'),\n    \"identity\": os.environ.get('PC_IDENTITY'),\n    \"secret\":   os.environ.get('PC_SECRET')\n}\n```\n\n## Support\n\nThis project has been developed by members of the Prisma Cloud CS and SE teams, it is not Supported by Palo Alto Networks.\nNevertheless, the maintainers will make a best-effort to address issues, and (of course) contributors are encouraged to submit issues and pull requests.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Prisma Cloud API SDK for Python",
    "version": "5.2.16",
    "project_urls": {
        "Homepage": "https://github.com/PaloAltoNetworks/prismacloud-api-python"
    },
    "split_keywords": [
        "prisma",
        "cloud",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed119b0ae9e236533cd372a0b61d482038d173635a1bd569717a2aed0a654101",
                "md5": "31a7397eabe8a420b17c46b75291b270",
                "sha256": "aa86e6ff4af9593322cc077bdc11bbab1c6e3da54992c128f332fd2c378dec29"
            },
            "downloads": -1,
            "filename": "prismacloud_api-5.2.16-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "31a7397eabe8a420b17c46b75291b270",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 35634,
            "upload_time": "2024-04-12T12:46:50",
            "upload_time_iso_8601": "2024-04-12T12:46:50.185655Z",
            "url": "https://files.pythonhosted.org/packages/ed/11/9b0ae9e236533cd372a0b61d482038d173635a1bd569717a2aed0a654101/prismacloud_api-5.2.16-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a1c3a56e7fbd17417b56ba5188e021239bb4feb4299602dbd04c1402b9460d2",
                "md5": "ffc6ebd751aae5885b1ca7ae80517290",
                "sha256": "fffa26b5950e05fc634a53779b2e5f930e0587b3c33d6450758d88c283a323e8"
            },
            "downloads": -1,
            "filename": "prismacloud-api-5.2.16.tar.gz",
            "has_sig": false,
            "md5_digest": "ffc6ebd751aae5885b1ca7ae80517290",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 25102,
            "upload_time": "2024-04-12T12:46:51",
            "upload_time_iso_8601": "2024-04-12T12:46:51.823962Z",
            "url": "https://files.pythonhosted.org/packages/3a/1c/3a56e7fbd17417b56ba5188e021239bb4feb4299602dbd04c1402b9460d2/prismacloud-api-5.2.16.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-12 12:46:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PaloAltoNetworks",
    "github_project": "prismacloud-api-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "prismacloud-api"
}
        
Elapsed time: 0.29638s