commoncode
Set of common utilities, originally split from ScanCode
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with six straightforward runtime dependencies.
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
(unclear) — 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.
last release 2026-06-11 (64 days) · last repo commit 2026-08-07 · 2,602 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 168,969 downloads/mo, #10,432 on PyPI
Alternatives
Verify before relying
pip install commoncode
import commoncode
# Use utility functions from the library for path, date, file, or hash operations- 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.
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 on it.
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
Before you install
Low install friction with six straightforward runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities.
Requires Python 3.10 or later.
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
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 packagesattrsBeautifulsoup4clickrequestssaneyamltext_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 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software DevelopmentTopic :: Utilities |
Evidence: commoncode-32.5.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “date and hash handling”
- commoncodeCommonCode provides utility functions for handling paths, dates,…
- hdx-python-utilitiesProvides a collection of utilities for Python developers covering…
- dict-hashGenerates consistent hashes for Python dictionaries and supports…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also extractcode · filehash · utils · oslo.utils · ubiquerg · scancode-toolkit · bx-py-utils · extractcode-libarchive · probableparsing · typecode