Python SDK for ANY.RUN APIs
Project description
ANY.RUN Tools
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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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
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 anyrun_tools-0.1.1.tar.gz.
File metadata
- Download URL: anyrun_tools-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f302491a6474cb4eef3d0ecd83491dbc3f0c892abffb0ad9e266e5dca77145
|
|
| MD5 |
fd9e0f5ef73a6335b691cf67ddfa142e
|
|
| BLAKE2b-256 |
58f9ff04b2176951b5fc1ab3a320aceecf1c6ce3c81d70911c9633cbb0dfdf6a
|
Provenance
The following attestation bundles were made for anyrun_tools-0.1.1.tar.gz:
Publisher:
publish.yml on bykovk-pro/anyrun-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyrun_tools-0.1.1.tar.gz -
Subject digest:
10f302491a6474cb4eef3d0ecd83491dbc3f0c892abffb0ad9e266e5dca77145 - Sigstore transparency entry: 172372847
- Sigstore integration time:
-
Permalink:
bykovk-pro/anyrun-tools@de6293a2225a756120a49ed00af96571320ad077 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/bykovk-pro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@de6293a2225a756120a49ed00af96571320ad077 -
Trigger Event:
release
-
Statement type:
File details
Details for the file anyrun_tools-0.1.1-py3-none-any.whl.
File metadata
- Download URL: anyrun_tools-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f6908190ee62cb4ac8640311336e2a39e482767469ff181d8e537d11286dca0
|
|
| MD5 |
7cf7a352131bbc2f5aa93fa88fe74e5a
|
|
| BLAKE2b-256 |
dee505b30df68e2795c36f368c4ba8beaba233fa73ba11ba7a7ebb5e38c22772
|
Provenance
The following attestation bundles were made for anyrun_tools-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on bykovk-pro/anyrun-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyrun_tools-0.1.1-py3-none-any.whl -
Subject digest:
2f6908190ee62cb4ac8640311336e2a39e482767469ff181d8e537d11286dca0 - Sigstore transparency entry: 172372848
- Sigstore integration time:
-
Permalink:
bykovk-pro/anyrun-tools@de6293a2225a756120a49ed00af96571320ad077 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/bykovk-pro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@de6293a2225a756120a49ed00af96571320ad077 -
Trigger Event:
release
-
Statement type: