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/byceps/byceps
09 December 2025, 06:54:04 UTC
  • Code
  • Branches (4)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • refs/heads/payment-gateway-mollie
    • refs/heads/test-debug
    • refs/heads/zammad-integration
    No releases to show
  • 52341da
  • /
  • docs
  • /
  • configuration_file
  • /
  • index.rst
Raw File Download
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:388e91b38331a2fbd60bb96982858d8091092e79
origin badgedirectory badge
swh:1:dir:659ab0f1722dd65816eca3a4f742556ac676b698
origin badgerevision badge
swh:1:rev:6fa71d12859037ed455b86801f7bf67a663ab141
origin badgesnapshot badge
swh:1:snp:9268a85e30dd2b40129cb545c2fb95366ce4e69f

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: 6fa71d12859037ed455b86801f7bf67a663ab141 authored by Jochen Kupperschmidt on 07 December 2025, 22:01:17 UTC
Do not persist auth token in Git config in CI actions
Tip revision: 6fa71d1
index.rst
******************
Configuration File
******************

BYCEPS is meant to be configured with a configuration file.

An example file is available at :file:`config/config.toml.example`.


Top-Level Section
=================

.. code-block:: toml

    locale = "en"
    propagate_exceptions = false
    secret_key = "INDIVIDUAL-KEY-GOES-HERE"
    timezone = "Europe/Berlin"


.. confval:: locale
   :type: string

   The default locale.

   *required*


.. confval:: propagate_exceptions
   :type: boolean
   :default: ``false``

   Reraise exceptions instead of letting BYCEPS handle them.

   This is useful if an external service like Sentry_ should handle
   exceptions.

   If not set, this is implicitly true if debug mode and/or testing mode
   are enabled.

   Handled by Flask_.

   .. _Flask: https://github.com/pallets/flask
   .. _Sentry: https://sentry.io/

   *optional*


.. confval:: secret_key
   :type: string

   A secret key that will be for security features such as signing
   session cookies.

   Should be a long, random string.

   BYCEPS provides a command-line tool to securely :ref:`generate a
   secret key <Generate Secret Key>`.

   *required*


.. confval:: timezone
   :type: string

   The default timezone.

   *required*


Applications Section
====================

Maps applications to hostnames.

At least one application has to be specified.

An example with admin application, API application, and two sites:

.. code-block:: toml

    [apps]
    admin = { server_name = "admin.example" }
    api = { server_name = "api.example" }
    sites = [
      { server_name = "site1.example", site_id = "site1" },
      { server_name = "site2.example", site_id = "site2" },
    ]


.. confval:: apps.admin
   :type: string

   Hostname to mount the admin application on.

   *optional*


.. confval:: apps.api
   :type: string

   Hostname to mount the API application on.

   *optional*


.. confval:: apps.sites
   :type: string

   Hostnames to mount site applications on.

   *optional*


Database Section
================

Properties to connect to the relational database (i.e. PostgreSQL) with.

An example that connects to PostgreSQL on the local host and the default
port, authenticating as user ``byceps`` with password ``hunter2``, and
selecting the named database ``byceps``:

.. code-block:: toml

    [database]
    host = "localhost"
    port = 5432
    username = "byceps"
    password = "hunter2"
    database = "byceps"


.. confval:: database.host
   :type: string
   :default: ``"localhost"``

   Hostname to connect to.

   *optional*


.. confval:: database.port
   :type: int
   :default: ``5432``

   Port to connect to.

   *optional*


.. confval:: database.username
   :type: string

   Username to authenticate with.

   *required*


.. confval:: database.password
   :type: string

   Password to authenticate with.

   *required*


.. confval:: database.database
   :type: string

   Database to use.

   *required*


Development Section
===================

Development helpers

An example that enables the style guide but not the debug toolbar:

.. code-block:: toml

    [development]
    style_guide_enabled = true
    toolbar_enabled = false


.. confval:: development.style_guide_enabled
   :type: boolean
   :default: ``false``

   Enables BYCEPS' style guide, available at ``/style_guide/`` both in
   admin mode and site mode.

   *optional*


.. confval:: development.toolbar_enabled
   :type: boolean
   :default: ``false``

   Enables the debug toolbar (provided by Flask-DebugToolbar_).

   .. _Flask-DebugToolbar: https://github.com/pallets-eco/flask-debugtoolbar

   *optional*


Discord Section
===============

Integration with Discord_.

.. _Discord: https://discord.com/


.. code-block:: toml

    [discord]
    enabled = true
    client_id = "discord-client-id"
    client_secret = "discord-client-secret"


.. confval:: discord.enabled
   :type: boolean
   :default: ``false``

   Enables the integration Discord.

   *required if section is defined*


.. confval:: discord.client_id
   :type: string

   Discord client ID.

   *required if section is defined*


.. confval:: discord.client_secret
   :type: string

   Discord client secret.

   *required if section is defined*


Invoice Ninja Section
=====================

Integration with `Invoice Ninja`_.

.. _Invoice Ninja: https://invoiceninja.com/


.. code-block:: toml

    [invoiceninja]
    enabled = true
    api_key = "random-characters"
    base_url = "https://invoiceninja.example"


.. confval:: invoiceninja.enabled
   :type: boolean
   :default: ``false``

   Enables the integration with Invoice Ninja.

   *required if section is defined*


.. confval:: invoiceninja.api_key
   :type: string

   Invoice Ninja API key.

   *required if section is defined*


.. confval:: invoiceninja.base_url
   :type: string

   Base URL (without trailing slash) of the Invoice Ninja instance to
   integrate with.

   *required if section is defined*


Metrics Section
===============

Enable the Prometheus_-compatible metrics endpoint at ``/metrics/``.

Only available on the admin application.

.. _Prometheus: https://prometheus.io/


An example that enables the metrics endpoint:

.. code-block:: toml

    [metrics]
    enabled = true


.. confval:: metrics.enabled

   :type: boolean
   :default: ``false``

   Enables the metrics endpoint.

   *required if section is defined*


Payment Gateways Section
========================

Payment gateway integrations


PayPal Section
--------------

Integration with payment gateway provider PayPal_.

.. _PayPal: https://www.paypal.com/


.. code-block:: toml

    [payment_gateways.paypal]
    enabled = true
    client_id = "paypal-client-id"
    client_secret = "paypal-client-secret"
    environment = "sandbox"


.. confval:: payment_gateways.paypal.client_id
   :type: string

   The client ID for payments via PayPal.

   *required if section is defined*


.. confval:: payment_gateways.paypal.client_secret
   :type: string

   The client secret for payments via PayPal.

   *required if section is defined*


.. confval:: payment_gateways.paypal.environment
   :type: string

   The environment for payments via PayPal.

   ``sandbox`` for testing, ``live`` for production use.

   *required if section is defined*


Stripe Section
--------------

Integration with payment gateway provider Stripe_.

.. _Stripe: https://stripe.com/


.. code-block:: toml

    [payment_gateways.stripe]
    enabled = true
    secret_key = "stripe-secret-key"
    publishable_key = "stripe-publishable-key"
    webhook_secret = "stripe-webhook-secret"


.. confval:: payment_gateways.stripe.publishable_key
   :type: string

   The publishable key for payments via Stripe.

   *required if section is defined*


.. confval:: payment_gateways.stripe.secret_key
   :type: string

   The secret key for payments via Stripe.

   *required if section is defined*


.. confval:: payment_gateways.stripe.webhook_secret
   :type: string

   The webhook secret for payments via Stripe.

   *required if section is defined*


Redis Section
=============

URL to connect to the Redis_ database with.

.. _Redis: https://redis.io/


An example for a Redis instance running on the local host on its default
port, using the first database (#0):

.. code-block:: toml

    [redis]
    url = "redis://127.0.0.1:6379/0"


.. confval:: redis.url
   :type: string

   The URL used to connect to Redis.

   The format can be one of these:

   * ``redis://[[username]:[password]]@localhost:6379/0`` (TCP socket)
   * ``rediss://[[username]:[password]]@localhost:6379/0`` (SSL-wrapped
     TCP socket)
   * ``unix://[[username]:[password]]@/path/to/socket.sock?db=0`` (Unix
     domain socket)

   The documentation for ``Redis.from_url`` provides `details on
   supported URL schemes and examples
   <https://redis.readthedocs.io/en/stable/connections.html#redis.Redis.from_url>`_.

   *required*


SMTP Section
============

E-mail sending via the Simple Mail Transfer Protocol (SMTP).

An example to send e-mail to a mail server on the local host on its
standard port:

.. code-block:: toml

    [smtp]
    host = "localhost"
    port = 25
    starttls = true
    use_ssl = true
    username = "smtp-user"
    password = "smtp-password"
    suppress_send = false


.. confval:: smtp.host
   :type: string
   :default: ``"localhost"``

   The host of the SMTP server.

   *optional*


.. confval:: smtp.password
   :type: string
   :default: ``""``

   The password to authenticate with against the SMTP server.

   *optional*


.. confval:: smtp.port
   :type: integer
   :default: ``25``

   The port of the SMTP server.

   *optional*


.. confval:: smtp.starttls
   :type: boolean
   :default: ``false``

   Put the SMTP connection in TLS (Transport Layer Security) mode.

   *optional*


.. confval:: smtp.suppress_send
   :type: boolean
   :default: ``false``

   Suppress sending of e-mails.

   *optional*


.. confval:: smtp.use_ssl
   :type: boolean
   :default: ``false``

   Use SSL for the connection to the SMTP server.

   *optional*


.. confval:: smtp.username
   :type: string
   :default: ``""``

   The username to authenticate with against the SMTP server.

   *optional*

back to top

Software Heritage — Copyright (C) 2015–2025, 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