Table Of Contents

Previous topic

Configuration

Next topic

Data Sources

This Page

API

Data Server

Data Source

class firefly.data_source.DataSource(*args, **kwargs)

Base class for Firefly Data Sources

list_path(path)

given an array of path components, list the (presumable) directory

UI Server

Util

firefly.util.b58decode(encoded)

Decodes a base58 string to its integer value

firefly.util.b58encode(value)

Encodes an integer value as a base58 string

firefly.util.generate_access_token(key, duration=60)

Generate an access token valid for the given number of seconds

firefly.util.import_module(dotted_path)

Import a module path like ‘a.b.c’ => c module

firefly.util.import_module_class(dotted_path)

Import a module + class path like ‘a.b.c.d’ => d attribute of c module

firefly.util.last_dot_splitter(dotted_path)

Split a string on the last dot.

‘aaa.bbb.ccc’ => (‘aaa.bbb’, ‘ccc’) ‘aaa’ => (‘’, ‘aaa’)

firefly.util.setup_logging(logger_name)

Sets up logging to stdout for a service script.

firefly.util.verify_access_token(token, key)

Verify that the given access token is still valid. Returns true if it is, false if it either failed to validate or has expired.

A token is a combination of a unix timestamp and a signature