Skip to main content
SCANOSS-PY provides a simple, easy-to-consume library for interacting with SCANOSS APIs and engines.

Prerequisites

Before you begin, make sure you have:

Installation

Standard Installation

Install SCANOSS-PY from PyPI:

Fast Winnowing

Provides 15x performance improvement in fingerprinting.

Dependency Scanning

To enable dependency detection from package manifests and lockfiles, install scancode-toolkit:
scancode-toolkit is only required if you want to use the -D or --dependencies flag for scanning declared dependencies. Standard file and snippet scanning does not require this dependency.

Installation on Externally Managed Environments

Modern Linux distributions (Ubuntu 23.04+, Fedora 38+, Debian 11+).

Docker Installation

Configuration

API Access Setup

While SCANOSS works without an API key, the free tier has usage limitations. To avoid hitting these limits, configure your API key before scanning. Set API Key via Environment Variables:
scanoss-py automatically detects the SCANOSS_API_KEY environment variable when set. You can also pass the API key directly with --key $SCANOSS_API_KEY when running the tool.

Getting Started

Basic Scanning

Scanning with Snippet Tuning

SCANOSS-PY exposes snippet tuning parameters via CLI flags that let you control match sensitivity directly from the command line. Reduce False Positives:

How Snippet Tuning Works

When you use these settings, scanoss-py:
  1. Reads your scanoss.json (if present)
  2. Reads CLI arguments (used as fallback only)
  3. Merges both sources — scanoss.json takes precedence over CLI
  4. Encodes the merged settings
  5. Sends to the SCANOSS API
  6. Server applies tuning during the scan
For more details on configuring these parameters in scanoss.json, see the SCANOSS Settings documentation.

Viewing results