--- id: commoncode version: "32.5.2" license: unclear license_treatment: unclear maintenance: active --- # commoncode — Set of common utilities, originally split from ScanCode License: unclear · Maintenance: active · Downloads: 169.0K/mo ## 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 above — 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 pip install commoncode uv add commoncode 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_current - Install friction: low - Maintenance: active - Downloads: 169.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags file and path utilities, date and hash handling, common utility functions, scancode toolkit utilities, file processing helpers, path manipulation library, hash and date utilities, file-utilities, scancode-ecosystem [View on SkillFed](https://skillfed.io/packages/commoncode) · [View on PyPI](https://pypi.org/project/commoncode/)