.. _current_implementation_databases_and_api: The database and the API ======================== The database for Fedora Badges stores the badge definitions. and what users have been granted these badges. These is also a Python API for interacting with the database. - Source repository: https://github.com/fedora-infra/tahrir-api - Production location: db01.iad2.fedoraproject.org/tahrir Technology used --------------- The database and API is written in Python 2 and uses SQLAlchemy for database management. In the production deployment, a Postgres database is used. Basic table information ----------------------- The badges database appears to have been implemented with extra features for Open Badges (or Badgr) compatibility, but a lot of these tables are not really in use in the production deployment of Fedora Badges. ============= ========================================================================== DB Table Information ============= ========================================================================== Person A table for a user. Contains basic information about the user Badge A table of all the badge definitions. Note that the badge image is not stored in the DB, it is just a link to an image on the backend server. Also, the criteria for a badge is only a URL to criteria. Assertion A table that maps users to badges allowing them to arbitrarily grant them. Authorization A table that maps users to badges allowing them to arbitrarily grant them. Issuer A table of the issuers that issue badges. In Fedora badges, there is only one issuer -- Fedora, so not really used. Series A table to do with having a series of badges -- can't find much documentation about it, but on production badges, it is empty, so not in use. Milestones Another table to do with having a series of badges -- can't find much documentation about it, but on production badges, it is empty, so not in use. Team Yet another table to do with having a series of badges -- can't find much documentation about it, but on production badges, it only has one entry 'Infrastructure'. ============= ==========================================================================