Skip to main content

An utility for listing & searching Open Source Initiative licenses via their public API

Project description

osilic: OSI License CLI & Python Package

osilic is a Python package and command-line tool for listing, searching, and viewing details of OSI Approved Licenses® using the official OSI API.

Features

  • List all OSI Approved Licenses®
  • View details for a specific license by SPDX ID
  • Search licenses by name
  • Automatic suggestions for similar licenses if a license is not found
  • Usable as a standalone CLI or as a Python package
  • Filter licenses by keywords
  • Auto suggest available keywords upon entering wrong keyword filters
  • Filter licenses by stewards
  • Auto suggest available licenses upon entering wrong stewards filters

Installation

From Pypi index

pip install osilic

Using pip (editable mode for development)

pip install -e .

Or with uv:

uv pip install -e .

Requirements

  • Python 3.8+
  • requests and tabulate Python packages

Usage

CLI

After installation, use the osilic command:

  • List all licenses:

    osilic
    

    osilic

  • Show details for a license by SPDX ID:

    osilic gpl-2-0
    

    osilic gpl-3-0

  • Search licenses by name (-s):

    osilic -s mit
    

    osilic -s gpl

  • If a license is not found, the CLI will suggest similar licenses automatically. osilic mi

  • Filter licenses by steward (-w):

    osilic -w zope-foundation
    

    osilic -w zope-foundationl

  • If a license is not found, the CLI will suggest list of stewards to use automatically. osilic -w dummy

  • Filter licenses by keyword (-k):

    osilic -k other-miscellaneous
    

    osilic -k other-miscellaneous

  • If a license is not found, the CLI will suggest list of keywords to use automatically. osilic -k test

As a Python Package

You can also use OLC in your own Python code:

from olc.model import license_from_dict, print_licenses_table, print_license_details_table
import requests

resp = requests.get("https://opensource.org/api/license")
licenses = license_from_dict(resp.json())
print_licenses_table(licenses)

API Reference

  • List all licenses: https://opensource.org/api/license
  • License details: https://opensource.org/api/license/{spdx-id}
  • Search licenses: https://opensource.org/api/license?name={search_key}
  • Filter licenses by keywords: https://opensource.org/api/license?keyword={filter_keyword}
  • Filter licenses by stewards: https://opensource.org/api/license?steward={filter_steward_key}

Reference & Further Reading

Development

License

This project is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License.

Copyright © 2025 Dinesh R

See LICENSE for details.

Author

  • Dinesh R

Changelog

See CHANGELOG.md for a list of all commits and changes.


For more information on OSI licenses, visit opensource.org.

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

osilic-0.2.2.tar.gz (389.0 kB view details)

Uploaded Source

Built Distribution

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

osilic-0.2.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file osilic-0.2.2.tar.gz.

File metadata

  • Download URL: osilic-0.2.2.tar.gz
  • Upload date:
  • Size: 389.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for osilic-0.2.2.tar.gz
Algorithm Hash digest
SHA256 cabfc92d0bd57cdf371cce3c07acc9950aff4b117eaed7161191c676a078a3ca
MD5 e236699c1cacaad7cc68e643f2a57617
BLAKE2b-256 dba6d6499d63bf9f0e4b0df4c7e6120967aeff61c9b193bb6e5150c027877a13

See more details on using hashes here.

File details

Details for the file osilic-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: osilic-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for osilic-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3a1662eee337c6f088eec5f1823dc35227dc756203d7d7a9038390c6f19f8ed
MD5 9f7fe5886b779d1a60564230c4b32f94
BLAKE2b-256 e6b22c08a80679b27bba280e06c4421994d86ebf569dcf5179ce06a7f1d419f8

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