Page MenuHomeSoftware Heritage

Implement SWH Web applications using Django
Closed, MigratedEdits Locked

Description

Currently, the web RESTful API of Software Heritage is implemented using the Flask framework (http://flask.pocoo.org/).
A Web UI for easily navigating in the archive will be created soon and the Django framework (https://www.djangoproject.com/) will be used to implement it.

Using the Django framework is an obvious choice as it offers numerous builtins features and enables to quickly design
and implement Web apps in Python. Moreover, it is really well documented and there is a large community around it that
contributes to extend its functionnalities.

In order to ease the development and the maintenance of the SWH Web applications, we should use the same Web framework for the RESTful API
and the Web UI. Thus, the RESTful API implementation should be rewritten using the Django REST framework (http://www.django-rest-framework.org/).

Regarding the developments to perform, I currently see three high level tasks:

  • Implement a prototype for the Web API with the Django REST framework offering the same features as the currently available one (https://archive.softwareheritage.org/api/):
    • test ORM layer of django: feasible but too tighted to the underlying db backend technology and swh-storage abstraction layer should be used
    • prefer to use the same design as with the Flask implementation: use function based views wrapping calls to swh-storage
  • Migrate the SWH Web API implementation from Flask to Django REST framework: first landing to master in c92395c3cd2f
  • Implement the Web UI for navigating into the archive with Django

Event Timeline

anlambert triaged this task as Normal priority.Jul 21 2017, 11:15 AM
zack added a subscriber: zack.

I'm closing this "parent" task because the porting work from flask to django is now done.
Additional features (e.g., web-based browsing) are still TODO, but no longer related to switching stack.