{"id":20229255,"url":"https://github.com/rahulunair/pkgdb","last_synced_at":"2025-09-04T18:49:40.508Z","repository":{"id":87095179,"uuid":"266268535","full_name":"rahulunair/pkgDB","owner":"rahulunair","description":"Tools to fetch licenses and package metadata for Debian based OSes","archived":false,"fork":false,"pushed_at":"2020-06-25T17:51:33.000Z","size":5972,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T20:48:38.115Z","etag":null,"topics":["asyncio","debian-packages","licenses","python3","ubuntu","ubuntu-packages"],"latest_commit_sha":null,"homepage":"https://rahulunair.github.io/pkgDB/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rahulunair.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-23T05:20:12.000Z","updated_at":"2020-06-25T17:51:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"5da5f1d6-e5df-4ca8-a734-e403dce73ef6","html_url":"https://github.com/rahulunair/pkgDB","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rahulunair/pkgDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2FpkgDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2FpkgDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2FpkgDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2FpkgDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahulunair","download_url":"https://codeload.github.com/rahulunair/pkgDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2FpkgDB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273656924,"owners_count":25145003,"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-09-04T02:00:08.968Z","response_time":61,"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":["asyncio","debian-packages","licenses","python3","ubuntu","ubuntu-packages"],"created_at":"2024-11-14T07:35:02.659Z","updated_at":"2025-09-04T18:49:40.276Z","avatar_url":"https://github.com/rahulunair.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pkgDB\n\n**Utilites to fetch licenses and package metadata for Debian based OSes**\n\nI built this tool over a weekend sometime back, because it was difficult to figure out the license information of all\npackages in Ubuntu in a clean form, and I wanted to experiment with few things. Hope it is useful you, kindly raise a\nPR or an issue on improvements needed.\n\npkgDB is a standalone tool that:\n\n- Enables you to fetch ubuntu package and source metadata\n- Scrape the net for package licenses\n- Populate a databse with the metadata and license information\n- A REST API interface to interact with the database\n\n## How to use?\n\nTo try out the database over a REST interface:\n\n```bash\ngit clone https://github.com/rahulunair/pkgDB \u0026\u0026 cd pkgDB/scripts\n./run_api_server.sh\n```\n\n## Database\n\nThis tool populates a package database for all packages in Ubuntu along with its sources. The two primary tables\navailable in the database (`packages.db`) are, `sources` and `binaries`.\n\nLet's see some sample output of these tables\n\n### Binaries\n\nThe `binaries` table like the name suggests has all the metadata information regarding a package that can be installed \non Ubuntu using `apt`.\n\n![image](./images/binaries.png)\n\nAs you can see, it shows the package name, version, os name, version, package license etc. The full list of columns is given below:\n\n\n| columns    |\n|----------- |\n|name        |\n|version     |\n|source      |\n|maintainer  |\n|homepage    |\n|sha1        |\n|sha256      |\n|pkg_zip     |\n|os_name     |\n|os_version  |\n|license     |\n\n### Sources\n\nThe `sources` table like the name suggests has all the metadata information regarding a source package for a binary that \ncan be installedon Ubuntu using `apt`.\n\n![image](./images/sources.png)\n\nAs you can see, it shows the source package name, version, binary packages associated with the source, os name, version, package license etc.\nThe full list of columns is given below:\n\n\n| columns    |\n|----------- |\n|name        |\n|version     |\n|binaries    |\n|source_url  |\n|maintainer  |\n|homepage    |\n|sha1        |\n|sha256      |\n|pkg_zip     |\n|os_name     |\n|os_version  |\n|license     |\n\n\n## REST API\n\nThe tool has a REST API that can be used to interface with the database, the `scripts` directory has a bash script to set up a local\npackages db to query the database.\n\n - Run a RESTAPI server to interface with the packages.db (`../src/pkgDB/data/db/packages.db`)\n \n```bash\ngit clone https://github.com/rahulunair/pkgDB \u0026\u0026 cd pkgDB/scripts\n./run_api_server.sh\n```\n\n```python\nINFO:     Started server process [1533052]\nINFO:     Waiting for application startup.\nINFO:     Tortoise-ORM startup\n    connections: {'default': {'engine': 'tortoise.backends.sqlite', 'credentials': {'journal_mode': 'WAL', 'journal_size_limit': 16384, 'file_path': 'data/db/packages.db'}}}\n    apps: {'models': {'models': ['models'], 'default_connection': 'default'}}\nINFO:     Tortoise-ORM started, {'default': \u003ctortoise.backends.sqlite.client.SqliteClient object at 0x7fd804c48b20\u003e}, {'models': {'Binaries': \u003cclass 'models.Binaries'\u003e, 'Sources': \u003cclass 'models.Sources'\u003e}}\nINFO:     Application startup complete.\nINFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\n```\n\n\n\n\n## Contributions\n\nThis is an OSS tool, any contribution is welcome as long as it is benificial to the community as a whole.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulunair%2Fpkgdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulunair%2Fpkgdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulunair%2Fpkgdb/lists"}