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
  • 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

TI Lookup query Guide
ANY.RUN API documentation

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.1.1.tar.gz (19.5 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.1.1-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anyrun_sdk-1.1.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for anyrun_sdk-1.1.1.tar.gz
Algorithm Hash digest
SHA256 cac28802e346ae3a5b67a3a2a528e6e8d0130bbdea22ebed13b53e23eed141dd
MD5 3c4020f1e264e595487802c1b33163c3
BLAKE2b-256 4583ec1b335b46bdb28b7138b8b2ae38b5388b8dd2a6245fc4000486670f2ede

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyrun_sdk-1.1.1.tar.gz:

Publisher: release-action.yml on anyrun/anyrun-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: anyrun_sdk-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for anyrun_sdk-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffc0524122fe2b9fe480f15e295e46f3436e713949f6fa35dcc5754bd35844b6
MD5 40334db22328497a640830876e1aaeb9
BLAKE2b-256 50b56c968452619d550f4ccd10d930114f325495357ebee1b29e7e194cbd2060

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyrun_sdk-1.1.1-py3-none-any.whl:

Publisher: release-action.yml on anyrun/anyrun-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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