couchdb_download_token package


couchdb_download_token.config module

couchdb_download_token.couchdb_download_token module

couchdb_download_token.helpers module

Some helper functions.

couchdb_download_token.helpers.get_download_token(document: couchdb.client.Document)[source]

Get the download token of the specified document.

Returns:The download token or None if it isn’t defined.
couchdb_download_token.helpers.recursive_get(dict_, key)[source]

Get nested dictionary keys.

>>> recursive_get({"a": {"b": {"c": "d"}}}, "a.b.c")

Returns None if there are type conflicts.

Module contents

class couchdb_download_token.DownloadResource[source]

Bases: object

on_get(req, resp, database_name, document_id, filename)[source]
exception couchdb_download_token.HTTPForbidden(**kwargs)[source]

Bases: falcon.errors.HTTPForbidden

403 HTTP Error with the fixed title and description

I will avoid changing them for security reasons.

description = 'Incorrect download token or unexisting document or database'
title = 'Forbidden'