Skip to main content

Python SDK for ANY.RUN APIs

Project description

ANY.RUN Tools

Tests Documentation PyPI version Python versions License Code style: black Checked with mypy Downloads codecov

Python SDK for ANY.RUN APIs

Features

  • ✨ Modern async/await API
  • 🚀 Type hints and data validation with Pydantic
  • 💾 Built-in caching support (memory and Redis)
  • 🔄 Automatic retries with exponential backoff
  • 🚦 Rate limiting
  • 📝 Comprehensive documentation
  • 🧪 Extensive test coverage
  • 🐍 Supports Python 3.8-3.12

Installation

# Basic installation
pip install anyrun-tools

# With Redis caching support
pip install anyrun-tools[redis]

# With all optional dependencies
pip install anyrun-tools[all]

Quick Start

from anyrun import AnyRunClient

async with AnyRunClient(api_key="your-api-key") as client:
    # Submit file for analysis
    response = await client.sandbox.analyze(
        obj_type="file",
        file=b"file_content",
        env_os="windows",
        env_version="10"
    )

    task_id = response["data"]["task_id"]

    # Monitor analysis status
    async for update in client.sandbox.get_analysis_status(task_id):
        print(f"Status: {update['status']}")

    # Get analysis results
    result = await client.sandbox.get_analysis(task_id)
    print(f"Analysis score: {result['data']['score']}")

Available APIs

Sandbox API

  • Submit files and URLs for analysis
  • Monitor analysis progress in real-time
  • Get detailed analysis results
  • Manage analysis tasks

TI Lookup API (coming soon)

  • Look up file hashes
  • Get threat intelligence data
  • Check indicators of compromise

TI YARA API (coming soon)

  • Match YARA rules against samples
  • Get matching details
  • Manage YARA rules

Documentation

For detailed documentation, please visit https://bykovk-pro.github.io/anyrun-tools

Development

# Clone the repository
git clone https://github.com/bykovk-pro/anyrun-tools.git
cd anyrun-tools

# Create virtual environment
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

# Install development dependencies
pip install -e .[dev]

# Install pre-commit hooks
pre-commit install

# Build documentation
pip install -e .[docs]
mkdocs serve

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Security

If you discover a security vulnerability within ANY.RUN Tools, please send an e-mail to Kirill Bykov via bykovk@anyrun.tools. All security vulnerabilities will be promptly addressed.

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

anyrun_tools-0.1.0.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

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

anyrun_tools-0.1.0-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

Details for the file anyrun_tools-0.1.0.tar.gz.

File metadata

  • Download URL: anyrun_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for anyrun_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69d8c3e3f5000c5d0b063be83c8eb6f65ca03f479901545f08f7066be5d275b2
MD5 aaaf8bda26054d1be83a10fca23efeba
BLAKE2b-256 44d9f07c4b781ff5456d18a808826951a3edd9867fc57d515cd05e0dd2789ca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyrun_tools-0.1.0.tar.gz:

Publisher: publish.yml on bykovk-pro/anyrun-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anyrun_tools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: anyrun_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for anyrun_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9b1bc2c69ab08a101cd73d0c1910172cb1765a15dc6a55eff12da1790ce0aa9
MD5 c368be3531c36035ba31f7a50c411e02
BLAKE2b-256 1581d4a67a1914790bc364667f04c82d1b4803d2156bb59ec907f165b7126551

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyrun_tools-0.1.0-py3-none-any.whl:

Publisher: publish.yml on bykovk-pro/anyrun-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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