swh.deposit.config module

swh.deposit.config.setup_django_for(platform=None, config_file=None)[source]
Setup function for command line tools (swh.deposit.create_user) to

initialize the needed db access.


Do not import any django related module prior to this function call. Otherwise, this will raise an django.core.exceptions.ImproperlyConfigured error message.

  • platform (str) – the platform the scheduling is running

  • config_file (str) – Extra configuration file (typically for the production platform)


ValueError in case of wrong platform inputs.

class swh.deposit.config.APIConfig[source]

Bases: object

API Configuration centralized class. This loads explicitly the configuration file out of the SWH_CONFIG_FILENAME environment variable.