Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/planetary-research/signatories
30 January 2026, 13:25:08 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • refs/tags/v1.0
    No releases to show
  • 4a0f426
  • /
  • db_models.py
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:a4df60369ef77b7a3871e5d9891049980af7d6f3
origin badgedirectory badge
swh:1:dir:4a0f426da17a1dccecc19319a806b6e3f12a706f
origin badgerevision badge
swh:1:rev:2b84961a9c011e62c0878b2f04a43aae55fbd368
origin badgesnapshot badge
swh:1:snp:faaa41b12dc41214806b30fdbe0d9704a04f698a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 2b84961a9c011e62c0878b2f04a43aae55fbd368 authored by markwieczorek on 28 January 2026, 12:48:07 UTC
Merge pull request #39 from MarkWieczorek/main
Tip revision: 2b84961
db_models.py
import datetime
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()


class Signatory(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    orcid = db.Column(db.String(length=19), nullable=False)
    name = db.Column(db.String, nullable=False)
    campaign = db.Column(db.String, db.ForeignKey("campaign.action_slug"), nullable=False)
    affiliation = db.Column(db.String)
    anonymous = db.Column(db.Boolean, nullable=False, default=False)

    def __repr__(self):
        return "<Signatory %s>" % self.orcid


class Admin(db.Model):
    orcid = db.Column(db.String(length=19), primary_key=True)
    name = db.Column(db.String)
    role_id = db.Column(db.Integer, db.ForeignKey("user_role.role_id"), nullable=False, default=1)

    def __repr__(self):
        return "<Admin %s>" % self.orcid


class Block(db.Model):
    orcid = db.Column(db.String(length=19), primary_key=True)
    name = db.Column(db.String)

    def __repr__(self):
        return "<Block %s>" % self.orcid


class Campaign(db.Model):
    action_slug = db.Column(db.String, nullable=False, primary_key=True)
    owner_orcid = db.Column(db.String(length=19), default='')
    owner_name = db.Column(db.String, default='')
    action_kind = db.Column(db.String, nullable=False)
    action_name = db.Column(db.String, nullable=False)
    action_short_description = db.Column(db.String, default='')
    action_text = db.Column(db.String, nullable=False)
    sort_alphabetical = db.Column(db.Boolean, nullable=False, default=False)
    allow_anonymous = db.Column(db.Boolean, nullable=False, default=True)
    is_active = db.Column(db.Boolean, nullable=False, default=True)
    creation_date = db.Column(db.DateTime, nullable=False, default=datetime.datetime.now(datetime.UTC))
    closed_date = db.Column(db.DateTime, default=None)

    def __repr__(self):
        return "<Campaign %s>" % self.action_slug


class UserRole(db.Model):
    role_id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(length=255), nullable=False)

    def __repr__(self):
        return "<UserRole %s>" % self.name

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API