This is the official Python client library for ANY.RUN. Automate management of ANY.RUN REST endpoints
Project description
ANY.RUN SDK
This is the official Python client library for ANY.RUN.
With this library you can interact with the ANY.RUN REST API and automate your workflow quickly and efficiently.
Available features
TI Feeds API
Supports the following feed formats for search:
- MISP
- STIX
- Network iocs
TI Lookup API
- Look up URLs and file hashes
- Get threat intelligence data
- Check indicators of compromise
TI YARA API
- Search for new IOC using YARA rules
- Monitor Search progress in real-time
- Get detailed analysis results
Sandbox API
- Submit files and URLs for analysis
- Monitor analysis progress in real-time
- Get detailed analysis results
- Manage analysis tasks
Other features
- Built-in objects iterator
- Built-in exception handling
- The same synchronous and asynchronous interface
- Supports Python 3.9-3.13
The library public interface overview
import os
from anyrun.connectors import SandBoxConnector
def main():
with SandBoxConnector(api_key) as connector:
# Initialize the url analysis
task_id = connector.run_url_analysis('https://any.run')
print(f'Analysis successfully initialized. Task uuid: {task_id}')
# View analysis status in real time
for status in connector.get_task_status(task_id):
print(status)
# Get report results
report = connector.get_analysis_report(task_id, simplify=True)
print(report if report else 'No threats were found during the analysis')
# Remove the task from history
connector.delete_task(task_id)
if __name__ == '__main__':
# Setup ANY.RUN api key
api_key = os.getenv('ANY_RUN_Sandbox_API_KEY')
main()
You can find additional usage examples here
Installation Guide
You can install the SDK using pip or any other package manager
$ pip install anyrun-sdk
Also, you can install the SDK manually using pyproject.toml
$ git clone git@github.com:anyrun/anyrun-sdk.git
$ cd anyrun-sdk
$ python -m pip install .
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Useful links
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_sdk-1.2.3.tar.gz.
File metadata
- Download URL: anyrun_sdk-1.2.3.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32087eef82a1f7ccc6ae926f3e8f0e8f4d46c3b5591d69e1d1bb2b7ea47ae979
|
|
| MD5 |
fcfb787f42fce8f71f208517dff0c2e1
|
|
| BLAKE2b-256 |
e0c99812c8665e8efadc29bfc3bd50a02ab58920406d520df7ca6eb22decb75a
|
Provenance
The following attestation bundles were made for anyrun_sdk-1.2.3.tar.gz:
Publisher:
release-action.yml on anyrun/anyrun-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyrun_sdk-1.2.3.tar.gz -
Subject digest:
32087eef82a1f7ccc6ae926f3e8f0e8f4d46c3b5591d69e1d1bb2b7ea47ae979 - Sigstore transparency entry: 180811332
- Sigstore integration time:
-
Permalink:
anyrun/anyrun-sdk@1248592099a005b28a1dfb039ddf964085b8fcec -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/anyrun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-action.yml@1248592099a005b28a1dfb039ddf964085b8fcec -
Trigger Event:
release
-
Statement type:
File details
Details for the file anyrun_sdk-1.2.3-py3-none-any.whl.
File metadata
- Download URL: anyrun_sdk-1.2.3-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8a7ed5c9c5e601e0392f86a51a0f5a88830b0cfad5b2f40c6d06d981d6b8982
|
|
| MD5 |
4a9b56b2e2f295b0d955175c833e6536
|
|
| BLAKE2b-256 |
cf1577a429288c77a983e98c20af1eac427454e5f82bbaae183f3ce3a4d4ff59
|
Provenance
The following attestation bundles were made for anyrun_sdk-1.2.3-py3-none-any.whl:
Publisher:
release-action.yml on anyrun/anyrun-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyrun_sdk-1.2.3-py3-none-any.whl -
Subject digest:
c8a7ed5c9c5e601e0392f86a51a0f5a88830b0cfad5b2f40c6d06d981d6b8982 - Sigstore transparency entry: 180811335
- Sigstore integration time:
-
Permalink:
anyrun/anyrun-sdk@1248592099a005b28a1dfb039ddf964085b8fcec -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/anyrun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-action.yml@1248592099a005b28a1dfb039ddf964085b8fcec -
Trigger Event:
release
-
Statement type: