Skip to main content

Python library is an interface to the Xpanse Expander API.

Project description

https://github.com/PaloAltoNetworks/cortex-xpanse-python-sdk/blob/main/docs/_source/_static/xpanse_banner.png?raw=true https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blueviolet https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/pypi/l/xpanse https://img.shields.io/github/contributors/PaloAltoNetworks/cortex-xpanse-python-sdk

Overview

This library is intended to be an interface to the Xpanse Expander API.

Install

pip install xpanse

Requirements

Python 3.6+

Usage

Documentation

# Import client
from xpanse.client import ExClient

# initialize client
client = ExClient()

# get ip_range iterator object and dump to a list
ranges = client.assets.ip_range.list().dump()

You can view more example code in the examples directory.

Configuration

A valid Bearer token or JWT is required for use. Bearer tokens are suggested as JWTs have a limited lifespan.

Logging

Logging is handled through the python logging package. To enable different levels of verbosity in your scripts you can do the following:

import logging
logging.basicConfig(level=logging.DEBUG)

You can read more at https://docs.python.org/3/library/logging.html.

Project details


Download files

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

Source Distribution

xpanse-1.0.9.post18.tar.gz (87.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xpanse-1.0.9.post18-py3-none-any.whl (120.9 kB view details)

Uploaded Python 3

File details

Details for the file xpanse-1.0.9.post18.tar.gz.

File metadata

  • Download URL: xpanse-1.0.9.post18.tar.gz
  • Upload date:
  • Size: 87.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for xpanse-1.0.9.post18.tar.gz
Algorithm Hash digest
SHA256 98703748b06ba5bddbc194f90309225491d83a6a7528890df3a9f184a9b59900
MD5 d6c6ac3aa698fc32c7285ef741f4ece8
BLAKE2b-256 59482b9dbb2be49f7f72c7245a78ebeee1d936dd6e5c50b165e3a0e7d64d4d44

See more details on using hashes here.

File details

Details for the file xpanse-1.0.9.post18-py3-none-any.whl.

File metadata

  • Download URL: xpanse-1.0.9.post18-py3-none-any.whl
  • Upload date:
  • Size: 120.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for xpanse-1.0.9.post18-py3-none-any.whl
Algorithm Hash digest
SHA256 7248b296ea4940978dc9f2fa05866ca680966943157a4832049289c51081d280
MD5 ba49b1473d5746422a47ae9adb35452a
BLAKE2b-256 8a1a61d3d7bd6058f15e7d73d0e189302029a5a9d039330f6f4f1732c0a092df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page