Skip to content


Repository files navigation

SCANOSS Python Library

The SCANOSS python package provides a simple, easy to consume library for interacting with SCANOSS APIs/Engine.

Build/Test Local Package Build/Test Local Container Publish Package - PyPI Publish GHCR Container


To install (from, please run:

pip3 install scanoss


The package can be run from the command line, or consumed from another Python script.

For more details, please look at

Container Usage

To leverage the CLI from within a container, please look at


Before starting with development of this project, please read our CONTRIBUTING and CODE OF CONDUCT.


Python 3.7 or higher.

The dependencies can be found in the requirements.txt and requirements-dev.txt files.

To install dependencies, run:

pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt

To enable dependency scanning, an extra tool is required: scancode-toolkit

pip3 install -r requirements-scancode.txt

Package Development

More details on Python packaging/distribution can be found here, here, and here.

It is good practice to set up a Virtual Env (venv) to isolate and simplify development/testing. If using PyCharm, please follow these instructions.

In order to develop/test a Python package, it is necessary to register the package locally. This can be done using the following command:

python3 develop --user

There is also a Makefile in the repository, which provide helpers to achieve this:

make dev_setup

The client now makes use of REST & gRPC. For gRPC specific environment variables please look here.

Package Deployment

Packaging the library for deployment is done using setup.


The version of the package is defined in the scanoss init file. Please update this version before packaging/releasing an update.


To package the library, please run:

make dist


This project uses twine to upload packages to In order to run twine, a user needs to be registered with both TestPyPI and PyPI. Details for using TestPyPI can be found here and PyPI here.

Once the credentials have been stored in $HOME/.pypirc, the following command can be run:

make publish_test

This will deploy the package to TestPyPI. Run some tests to verify everything is ok.

Then deploy to prod:

make publish

This will deploy the package to PyPI.

The package will then be available to install using:

pip3 install scanoss
GitHub Actions

There are a number of workflows setup for this repository. They provide the following:


To request features or alert about bugs, please do so here.


Details of major changes to the library can be found in


Details about the Winnowing algorithm used for scanning can be found here.