{"id":24295,"library":"pyaskalono","title":"Pyaskalono","description":"Python bindings for askalono, a Rust library for detecting open-source license texts in files. Current version 0.2.0, requires Python >=3.11. Pre-built wheels available for major platforms.","status":"active","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/amzn/pyaskalono","tags":["license-detection","askalono","bindings"],"install":[{"cmd":"pip install pyaskalono","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Primary function for license detection.","symbol":"detect_license","correct":"from pyaskalono import detect_license"},{"note":"Return type with fields: spdx_id, name, text.","symbol":"LicenseResult","correct":"from pyaskalono import LicenseResult"},{"note":"For advanced usage with custom configuration.","symbol":"LicenseStore","correct":"from pyaskalono import LicenseStore"},{"note":"The Rust crate is askalono, but Python package is pyaskalono. Common mistake leads to ImportError.","wrong":"from askalono import detect_license","symbol":"pyaskalono","correct":"import pyaskalono"}],"quickstart":{"code":"from pyaskalono import detect_license\n\nlicense_text = \"\"\"MIT License\nCopyright (c) 2021\nPermission is hereby granted...\n\"\"\"\nresult = detect_license(license_text)\nprint(result.spdx_id)  # e.g., 'MIT'","lang":"python","description":"Detect license from a text string."},"warnings":[{"fix":"Read the file contents before calling detect_license: `with open('LICENSE') as f: text = f.read()`","message":"The `detect_license` function expects the full license text as a single string, not file paths. If you pass a file path, it will be treated as license content and likely fail or return garbage.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure input is a non-empty string of significant length. Check result is not None.","message":"The function may raise a `ValueError` if the input text is empty or too short (< 50 characters).","severity":"gotcha","affected_versions":"all"},{"fix":"Install Rust via rustup, then retry. Alternatively, use a platform with pre-built wheel.","message":"Pre-built wheels are only available for x86_64 Linux, Windows, and macOS. On other platforms (e.g., ARM Linux), pip will try to build from source, requiring Rust toolchain.","severity":"gotcha","affected_versions":"0.1.0 - 0.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install pyaskalono: `pip install pyaskalono`, then import: `from pyaskalono import detect_license`","cause":"Installed the wrong package or import path is incorrect. The package is 'pyaskalono', not 'askalono'.","error":"ModuleNotFoundError: No module named 'askalono'"},{"fix":"Upgrade to latest: `pip install --upgrade pyaskalono`","cause":"The function may not exist in older versions, or there is a naming conflict. Current version 0.2.0 exposes it.","error":"ImportError: cannot import name 'detect_license' from 'pyaskalono'"},{"fix":"Provide a longer text snippet, at least a few lines from a known license.","cause":"The input string is empty or too short (less than 50 characters) to detect any license.","error":"ValueError: License text too short"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}