Skip to main content

This is the official Python client library for ANY.RUN. Automate management of ANY.RUN REST endpoints

Project description

ANY.RUN logo


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
  • Built-in objects iterator

  • Synchronous and asynchronous interface

The library public interface overview

import os
from pprint import pprint

from anyrun.connectors.threat_intelligence import FeedsConnector


def main():
    # Initialize the connector object
    connector = FeedsConnector(api_key)
    
    # 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

$ pip3 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

Backward Compatibility

The SDK supports Python 3.9 and higher

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_sdk-1.0.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

anyrun_sdk-1.0.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file anyrun_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: anyrun_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for anyrun_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8ead76fd94256859311ea7c3bd505890c4b2d790d1180c2d1cf846ab60461b52
MD5 1f3b6abbc9c626aa5e03c25c4630b69b
BLAKE2b-256 eed47b08f16fc3329208db03f8fd9666e01a3d78b2f16be452f866d3231a2248

See more details on using hashes here.

File details

Details for the file anyrun_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: anyrun_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for anyrun_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64d919b54b1ccb6af7c5cff188a95a772d79ba59b1f5ee8e495511ccde4b4406
MD5 189ea861f9e9f55be6b02f22b554d433
BLAKE2b-256 0e116e568fc24aa98fc523f1985869028ea953d742992b8e21566386504b3935

See more details on using hashes here.

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