Looking at each function
The file server that we will be writing will be based on SFTP. Because SFTP calls can be expensive to make, we will use a caching implementation that relies on a popular Python library called Paramiko to retrieve files. For simplicity, we will only allow one SFTP server to be configured, but if you find yourself using this module, you may want to consider allowing multiple endpoints to be configured.
Setting up our module
Before we go over the functions that are used, we start setting up the module itself. We will implement a few functions that provide objects that we will use throughout the rest of our module:
''' The backend for serving files from an SFTP account. To enable, add ``sftp`` to the :conf_master:`fileserver_backend` option in the Master config file. .. code-block:: yaml fileserver_backend: - sftp Each environment is configured as a directory inside the SFTP account. The name of the directory must match the name of the environment. .. code...