{"id":28612675,"url":"https://github.com/checkmk/pyspdx","last_synced_at":"2025-10-11T23:19:17.566Z","repository":{"id":59815096,"uuid":"539069005","full_name":"Checkmk/pyspdx","owner":"Checkmk","description":"A small library to validate SPDX expressions","archived":false,"fork":false,"pushed_at":"2025-02-10T17:08:11.000Z","size":52,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-09-10T18:01:18.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Checkmk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-20T15:47:17.000Z","updated_at":"2025-06-30T13:22:28.000Z","dependencies_parsed_at":"2025-06-12T00:39:34.674Z","dependency_job_id":"648fd37c-dfe6-492f-9d68-b9d1a24b38f2","html_url":"https://github.com/Checkmk/pyspdx","commit_stats":null,"previous_names":["tribe29/pyspdx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Checkmk/pyspdx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Checkmk%2Fpyspdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Checkmk%2Fpyspdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Checkmk%2Fpyspdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Checkmk%2Fpyspdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Checkmk","download_url":"https://codeload.github.com/Checkmk/pyspdx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Checkmk%2Fpyspdx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009376,"owners_count":26084579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T00:39:31.221Z","updated_at":"2025-10-11T23:19:17.540Z","avatar_url":"https://github.com/Checkmk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyspdx\n\nShort library to validate SPDX expressions. I have not found any working implementation in python and I wanted to mess around with pyparsing anyways.\n\nI meanwhile found a similar library https://pypi.org/project/license-expression/.\n\n## API / Usage\nThis lib only exposes two functions:\n\n```\nfrom pyspdx import validate, tokenize\n\nvalidate(\"MIT\")  # Valid, does nothing\nvalidate(\"NotValid\") # Throws ValueError\nvalidate(\"(Apache-2.0 OR MIT) AND BSD-3-Clause\") # Valid\nvalidate(\"(DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2 OR (Apache-2.0 AND PostgreSQL OR OpenSSL)) AND (BSD-3-Clause OR Apache-2.0 WITH 389-exception)\") # Valid\n\nassert tokenize(\"MIT\") == [\"MIT\"]\n```\n\n## Used Sources\n- https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/\n- https://pyparsing-docs.readthedocs.io/en/latest/HowToUsePyparsing.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckmk%2Fpyspdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheckmk%2Fpyspdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckmk%2Fpyspdx/lists"}