Skip to content

Creating a web interface for Debian's dpkg/status file. Python Flask / SQLite.

Notifications You must be signed in to change notification settings

kimsappi/dpkg-status

Repository files navigation

About

Pre-assignment for Reaktor's 2020 junior dev positions. A hosted version should be available here.

The goal of the exercise was to parse the contents of /var/lib/dpkg/status (containing package information for Debian-based distributions) and display them in an HTML interface, listing the following information about each package:

  • name
  • description
  • dependencies
  • reverse dependencies (packages that depend on current package)
  • (reverse) dependencies should link to the package in question

Contrary to the original spec I also check the Pre-Depends field for dependencies.

There's also a JSON API available through /api/ and it's documentation can be found at /apiDocs.

Requirements

One of the goals of the exercise was to avoid extraneous dependencies. Therefore this implementation is quite standard, requiring only:

  • Python 3 (>= 3.6 or so, for f-string support)
  • Flask (Python web framework)
  • sqlite3 and similar modules that should be included with Python

Instructions

git clone https://github.com/kimsappi/dpkg-status.git
cd dpkg-status
pip3 install -r requirements.txt OR pip3 install flask
python3 app.py

The database is only generated once. If you wish to regenerate the database, you have to remove the the database file in the root directory.

About

Creating a web interface for Debian's dpkg/status file. Python Flask / SQLite.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published