skillfed

commoncode

Set of common utilities, originally split from ScanCode

commoncode v32.5.2 169.0K downloads/30d#10,432 on PyPI2,602
License unclear Active released

What it is and what it does

CommonCode is a utility library that originated as part of ScanCode Toolkit and was extracted into a standalone package. It provides common functions for working with file paths, dates, file operations, and hash computations—tasks that appear frequently in file scanning and analysis workflows. The package depends on a small set of well-established libraries: attrs, Beautifulsoup4, click, requests, saneyaml, and text_unidecode, which suggests it handles structured data parsing, command-line interaction, and text normalization alongside its core utilities.

The package is actively maintained, with a recent release and no known security vulnerabilities. It targets modern Python (3.10+) and is classified as production-stable. It is moderately popular in the PyPI ecosystem, suggesting it is used by projects that need reliable, reusable utility functions rather than implementing these operations from scratch.

Use it for:

  • Extracting common file and path handling logic into a shared library for multiple projects.
  • Building file scanning or analysis tools that need consistent date, hash, and file utilities.
  • Integrating with ScanCode Toolkit workflows that rely on these utility functions.
  • Normalizing text and handling structured data formats in data processing pipelines.
  • Reducing code duplication across projects by centralizing utility implementations.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

CommonCode provides utility functions for handling paths, dates, files, hashes, and other common operations, originally extracted from ScanCode Toolkit as a reusable library.

Yes, if you need common file, path, date, or hash utilities and want to avoid reimplementing them. The package is actively maintained, has low install friction, and carries no known vulnerabilities. However, verify the formal license terms before use in proprietary contexts, as the license treatment is marked unclear despite the Apache-2.0 claim in the description.

Install

commoncode on PyPI

pip

pip install commoncode

uv

uv add commoncode

poetry

poetry add commoncode

Installing commoncode

Before you install

Low install friction with six straightforward runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities.

License in practice

License treatment is unclear—the description states Apache-2.0, but the metadata does not confirm this formally. Verify the actual license terms before using in proprietary or restricted contexts.

Quickstart

pip install commoncode

import commoncode
# Use utility functions from the library for path, date, file, or hash operations

Requires Python 3.10 or later.

Verify before relying

  • Specific utility functions and API surface—the fact sheet does not detail what operations are available.
  • Whether the package is actively used by ScanCode Toolkit or maintained independently.
  • Formal license confirmation—description claims Apache-2.0 but metadata shows unclear treatment.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — attrs, Beautifulsoup4, click, requests, saneyaml, text_unidecode
Maintenance actively maintained — 64 days since the last release
Last repo commit
First released
Downloads 168,969/month — #10,432 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: commoncode-32.5.2-py3-none-any.whl

Keywords: utilities, scancode-toolkit

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software DevelopmentTopic :: Utilities

Tags

file and path utilitiesdate and hash handlingcommon utility functionsscancode toolkit utilitiesfile processing helperspath manipulation libraryhash and date utilities
file-utilitiesscancode-ecosystem

More Software Development packages