Skip to main content

panorama的第三方库

Project description

panorama-SDK

panorama API documentation

  • API version: 0.0.1
  • Package version: 1.0.4

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install panorama-sdk

(you may need to run pip with root permission: sudo pip install panorama-sdk)

Then import the package:

import panorama

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import panorama

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import panorama
from panorama.rest import ApiException
from pprint import pprint

# Configuration
host = "hostname"
username = "username"
password = "password"
conf = panorama.Configuration(
    host=host,
    username=username,
    password=password
)


# create an instance of the API class
api_instance = panorama.gateway.UserJwtControllerApi(panorama.ApiClient(conf))
login_vm = panorama.models.LoginVM(
    username=conf.username, password=conf.password
)  # LoginVM | loginVM

try:
    # authorize
    api_response = api_instance.authorize_using_post(login_vm)
    pprint(api_response)
    conf.api_key["id_token"] = api_response.id_token
    authorization_value = conf.get_api_key_with_prefix("id_token")
    pprint(authorization_value)

    # use authorize
    api_instance = panorama.gateway.AnalysisResourceApi(
            panorama.ApiClient(
                conf,
                header_name="Authorization",
                header_value=authorization_value
            )
        )
    # getAllanalysisTypes
    api_response = api_instance.get_allanalysis_types_using_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserJwtControllerApi->authorize_using_post: %s\n" % e)

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Elliot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for panorama-sdk, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size panorama_sdk-1.0.4-py3-none-any.whl (362.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size panorama-sdk-1.0.4.tar.gz (138.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page