Skip to main content

Python library for interacting with Axis device APIs

Project description

ax-devil-device-api

A Python library for interacting with Axis device APIs. Provides a type-safe interface with tools for device management, configuration, and integration.

Quick Start

Installation

pip install ax-devil-device-api

Environment Variables

For an easier experience, you can set the following environment variables:

export AX_DEVIL_TARGET_ADDR=<device-ip>
export AX_DEVIL_TARGET_USER=<username>
export AX_DEVIL_TARGET_PASS=<password>
export AX_DEVIL_USAGE_CLI="safe" # Set to "unsafe" to skip SSL certificate verification for CLI calls

Example Usage

import json
from ax_devil_device_api import Client, DeviceConfig

# Initialize client (recommended way using context manager)
config = DeviceConfig.https("192.168.1.81", "root", "fusion", verify_ssl=False)
with Client(config) as client:
    device_info = client.device.get_info()
    print(json.dumps(device_info, indent=4))

# Alternative: Manual resource management (not recommended)
client = Client(config)
try:
    device_info = client.mqtt_client.get_status()
    print(json.dumps(device_info, indent=4))
finally:
    client.close()  # Always close the client when done

CLI Usage Examples

Get device information

ax-devil-device-api-device-info --device-ip 192.168.1.10 --username admin --password secret info

Capture media

ax-devil-device-api-media --device-ip 192.168.1.10 --username admin --password secret --output image.jpg capture

Get SSH users

ax-devil-device-api-ssh --device-ip 192.168.1.10 --username admin --password secret list

Discover APIs

ax-devil-device-api-discovery --device-ip 192.168.1.10 --username admin --password secret list

And much more!

Disclaimer

This project is an independent, community-driven implementation and is not affiliated with or endorsed by Axis Communications AB. For official APIs and development resources, please refer to Axis Developer Community.

License

MIT License - See LICENSE file for details.

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

ax_devil_device_api-0.2.1.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

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

ax_devil_device_api-0.2.1-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file ax_devil_device_api-0.2.1.tar.gz.

File metadata

  • Download URL: ax_devil_device_api-0.2.1.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for ax_devil_device_api-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d8e9fac6e8607cdf3b6dbdce9682552066ed4480127580908f3e335f0d1dcfe2
MD5 8ac3a60e332257cf21c853b22315310a
BLAKE2b-256 9243ab02c329f65db21412a74c2b364e80534796e2e9cb8b0a0e896b45cda6ad

See more details on using hashes here.

File details

Details for the file ax_devil_device_api-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ax_devil_device_api-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afdde34a1c24c1002ad02b8859bfdc1a6aa6850cba3dbb2605cc5595c6d7ba48
MD5 4dc231b11e5a3a54a158ce50a3403c3f
BLAKE2b-256 c500962822ca347896b57a04318a08f9f56c8335ab8bdc6d5139ef56fb305639

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