https://github.com/inab/licenses-mapping
A tool to map strings to SPDX licenses names or IDs.
https://github.com/inab/licenses-mapping
fastapi licensing spdx
Last synced: 2 months ago
JSON representation
A tool to map strings to SPDX licenses names or IDs.
- Host: GitHub
- URL: https://github.com/inab/licenses-mapping
- Owner: inab
- License: apache-2.0
- Created: 2023-11-13T09:51:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-08T12:09:20.000Z (9 months ago)
- Last Synced: 2025-10-25T06:59:46.505Z (8 months ago)
- Topics: fastapi, licensing, spdx
- Language: Python
- Homepage: https://observatory.openebench.bsc.es/licenses-mapping/docs
- Size: 216 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# License Mapping API
[](https://opensource.org/licenses/Apache-2.0)
## Overview
A tool to map strings to SPDX licenses names or IDs.
📄 [API Documentation](https://observatory.openebench.bsc.es/licenses-mapping/docs)
🐳 [Docker image](https://hub.docker.com/repository/docker/emartps/license-mapping-api/general)
## Licenses Data
SPDX licenses metadata and synonyms are stored in the files of the `licenses` directory. The database is generated and updated from these files. The update is triggered by commmits being pushed to `main` branch.
### 🙌🏻 Contribution to licenses synonyms
To contribute to the licenses synonyms, please edit the files in the `licenses` directory and submit a pull request.
## Webhooks
The API is configured to listen to the following webhooks:
- `update`: update the database
- `ping`: ping the server
## CI - Database Update
The database is updated by the following GitLab CI workflow:
```yaml
stages:
- webhook
update:
stage: webhook
variables:
DEPLOY_CURL_COMMAND: 'curl -H "Content-Type: application/json" --data @data.json https://gitlab.bsc.es/inb/elixir/software-observatory/license-mapping-api/webhooks'
script:
- 'eval "$DEPLOY_CURL_COMMAND"'
rules:
- changes:
- licenses/*
when: on_success
```
## Development
Start the server with:
```python
python3 -m uvicorn main:app --reload
```