Async API connector for PT Sandbox instances
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ptsandbox-5.0.0.tar.gz.
File metadata
- Download URL: ptsandbox-5.0.0.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cfd5a025b6e36b141035becd1b1e8d10d8c080053240a8a13407fafb21e9c47
|
|
| MD5 |
55a45612de4fc372293de66e5ef717ee
|
|
| BLAKE2b-256 |
9b56770e00bb3cb27e646861c2dd285871e95d545e77592cf6f6954d8f1f9280
|
File details
Details for the file ptsandbox-5.0.0-py3-none-any.whl.
File metadata
- Download URL: ptsandbox-5.0.0-py3-none-any.whl
- Upload date:
- Size: 53.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db555c994571c69379f74d287266a1074482c4ba772a4c6ad081ff4b6ed826c
|
|
| MD5 |
b357fd9d7480655a51efc3b963b266ef
|
|
| BLAKE2b-256 |
949c957c1acb0e89a9d9eef85f24b41859905b46337c36c973719c1bf6db4836
|