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
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
$ pip install anyrun-sdk
$ git clone [email protected]:anyrun/anyrun-sdk.git
$ cd anyrun-sdk
$ python -m pip install .
There are a several conventions you must follow to add source code to the project
$ git clone [email protected]:anyrun/anyrun-sdk.git
$ git clone https://github.com/anyrun/anyrun-sdk.git
$ cd anyrun-sdk
$ git checkout -b <branch_title>
Branch title template: feature/public/[TaskShortDescription]
- TaskShortDescription - Feature name. Includes only lower case words separated by dashes
$ 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
$ cd anyrun-sdk
$ python -m pip install -e '.[dev]'
$ pytest tests -x
$ pytest --cov=anyrun --cov-report=term-missing
The SDK supports Python 3.9 and higher