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:
- Automate ANY.RUN Threat Intelligence Feeds management.
Supports the following feed formats:- MISP
- STIX
- Network iocs
- Automate Lookup and YARA search management
- Built-in objects iterator
- Synchronous and asynchronous interface
The library public interface overview
import os
from pprint import pprint
from anyrun.connectors import FeedsConnector
def main():
# Initialize the connector object
with FeedsConnector(api_key) as connector:
# Process request to ANY.RUN feeds endpoint
feeds = connector.get_stix(url=False, period='month', limit=500)
pprint(feeds)
if __name__ == '__main__':
# Setup ANY.RUN api key
api_key = os.getenv('ANY_RUN_FEEDS_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 setup.py module
$ git clone git@github.com:anyrun/anyrun-sdk.git
$ cd anyrun-sdk
$ python -m pip install .
Contribution Guide
There are a several conventions you must follow to add source code to the project
1. Clone project repository using one of the following ways
$ git clone git@github.com:anyrun/anyrun-sdk.git
$ git clone https://github.com/anyrun/anyrun-sdk.git
2. Jump into the project directory
$ cd anyrun-sdk
4. Create a new local branch
$ git checkout -b <branch_title>
Branch title template: feature/public/[TaskShortDescription]
- TaskShortDescription - Feature name. Includes only lower case words separated by dashes
5. Commit your changes
$ git add .
$ git commit -m <commit_title>
Commit title template: [ImpactType]([ImpactScope]): [CommitChanges]
-
ImpactType
- feat - To implement a new feature
- fix - To fix some bugs
- tests - To add some tests
-
ImpactScope - The part of the project in free form that is affected by the commit
- general - To add global changes
- logs - To add logs changes
- and other...
-
CommitChanges - The main changes. Includes only lower case words separated by spaces. Multiple changes could be written separated by commas
6. Open a new pull request
Running tests
1. Jump into the project directory
$ cd anyrun-sdk
2. Install dev requirements
$ python -m pip install -e '.[dev]'
3. Run tests
$ pytest tests -x
$ pytest --cov=anyrun --cov-report=term-missing
Backward Compatibility
The SDK supports Python 3.9 and higher
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.1.0.tar.gz.
File metadata
- Download URL: anyrun_sdk-1.1.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d312d7976daa93f24612487028e86a337684a293d72550ce22f642fbc1755f94
|
|
| MD5 |
8d546f8f9d64d25fb26a71e9543affed
|
|
| BLAKE2b-256 |
4b51961ef055d7e199a36d30e2fc15bb4a2b8d439df7ee4413cd6ee358e7415f
|
File details
Details for the file anyrun_sdk-1.1.0-py3-none-any.whl.
File metadata
- Download URL: anyrun_sdk-1.1.0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ce5ab171120fde0cfde549e5f5b0514fc19d4ab8d1af56d6d47a4b222577535
|
|
| MD5 |
b9f4b7a74464043e64a20bd9bcd40c8b
|
|
| BLAKE2b-256 |
4d42645efbe7a175158360349050a012ed5a9a5bf1f28847365fe76666f2733a
|