brite_etl.lib

This is where we put the main classes we’ll be using to access brite_etl. You can think of these like models, they mostly inherit from our abstract classes.

Classes

class FrameBuilder[source]

Fetch and build a frame class

Imports the frame class associated with passed frame, creates it with the passed dataframe, and returns a new instance of the class.

Not recommended to use directly, should get frames through brite_etl.lib.FrameSet instead.

Parameters:
  • name (str) – Name of the frame, lowercase. If prepared, prepend ‘prepared.’ to frame name.
  • df (Pandas.DataFrame) – Dataframe to use when building the frameclass
Returns:

The corrosponding frame class of requested frame

Return type:

Metaclass of brite_etl.abstracts.Frame

Inheritance

Inheritance diagram of FrameBuilder

class FrameSet(name)[source]

Store multiple frames in a single set

A FrameSet makes it easy to manage multiple isolated instances of frames. You can set a source of frames for automatic fetching, and quickly get frames when needed. Frames are stored in a dictionary.

Inheritance

Inheritance diagram of FrameSet

chain
Returns:This frameset wrapped in a chain
data_sources

A Dictionary containing the datasources to be used when fetching frames.

Probably don’t have to use directly, better off using set_data_sources()

Type:brite_etl.utils.types.DeepDict
frames

A Dictionary containing all frames that have been fetched thus far

Type:_FrameDict
set_data_sources(*args, **kwargs)[source]

Set Data Sources to use fetching frames

Parameters: