Skip to main content

Async API connector for PT Sandbox instances

Project description

Image

Async API connector for PT Sandbox instances


Documentation: https://security-experts-community.github.io/py-ptsandbox

Source Code: https://github.com/Security-Experts-Community/py-ptsandbox


Installation

You can use the following command to install the package:

PyPI:

python3 -m pip install ptsandbox

uv:

uv add ptsandbox

Nix:

TBA

Usage

Getting a list of all installed images using the API:

import asyncio
from ptsandbox import Sandbox, SandboxKey

async def main() -> None:
    key = SandboxKey(
        name="test-key-1",
        key="<TOKEN_FROM_SANDBOX>",
        host="10.10.10.10",
    )

    sandbox = Sandbox(key)
    print(await sandbox.api.get_images())

asyncio.run(main())

Getting system settings using the UI API:

import asyncio
from ptsandbox import Sandbox, SandboxKey

async def main():
    key = SandboxKey(
        name="test-key-1",
        key="<TOKEN_FROM_SANDBOX>",
        host="10.10.10.10",
        ui=SandboxKey.UI(
            login="login",
            password="password",
        ),
    )

    sandbox = Sandbox(key)
    # You must log in before using the UI API
    await sandbox.ui.authorize()

    print(await sandbox.ui.get_system_settings())

asyncio.run(main())

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

ptsandbox-5.0.4.tar.gz (47.8 kB view details)

Uploaded Source

Built Distribution

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

ptsandbox-5.0.4-py3-none-any.whl (60.4 kB view details)

Uploaded Python 3

File details

Details for the file ptsandbox-5.0.4.tar.gz.

File metadata

  • Download URL: ptsandbox-5.0.4.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ptsandbox-5.0.4.tar.gz
Algorithm Hash digest
SHA256 86ee836ba29517984b51512c3cf573d97cccd913acffbe7fa76beb1c3d6a37aa
MD5 65d8ee05ce6c916ca0058856472b31e0
BLAKE2b-256 341f6e72675f43ace59c5aae5ce4784e59939724fe42fe2e8414c6efa82e753a

See more details on using hashes here.

File details

Details for the file ptsandbox-5.0.4-py3-none-any.whl.

File metadata

  • Download URL: ptsandbox-5.0.4-py3-none-any.whl
  • Upload date:
  • Size: 60.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ptsandbox-5.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b865410348d9109abe12b35f705139349f989c497ac89f7aa3bd38c63ce96914
MD5 21f3158651c72974adaaa6b9aeb51b8b
BLAKE2b-256 a802efda9e1f7c96cf39952e88c219745f79f6285bbe33380a47b44c6088fafd

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