l.a.htaccess : module documentation

Part of lp.archivepublisher

Writing of htaccess and htpasswd files.
Function write_htaccess Write a htaccess file for a private archive.
Function write_htpasswd Write out a new htpasswd file.
Function make_salt Produce a salt from an input string.
Function htpasswd_credentials_for_archive Return credentials for an archive for use with write_htpasswd.
def write_htaccess(htaccess_filename, distroot):
Write a htaccess file for a private archive.
Parametershtaccess_filenameFilename of the htaccess file.
distrootArchive root path
def write_htpasswd(filename, users):
Write out a new htpasswd file.
ParametersfilenameThe file to create.
usersIterable over (user, password, salt) tuples.
def make_salt(s):
Produce a salt from an input string.

This ensures that salts are drawn from the correct alphabet ([./a-zA-Z0-9]).

def htpasswd_credentials_for_archive(archive):
Return credentials for an archive for use with write_htpasswd.
ParametersarchiveAn IArchive (must be private)
ReturnsIterable of tuples with (user, password, salt) for use with write_htpasswd.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.