Overview
A python package for working with the BriteCore ETL.
PLEASE NOTE: brite_etl follows Semantic Versioning, and is currently in the initial development phase (0.x.x). Use with caution.
Use
This is all broken down on the introduction page.
import brite_etl
from brite_etl.core.io.frame_sources import CsvSource
# Create a "set" of frames to work with...
contoso = brite_etl.lib.FrameSet('contoso')
#Set the source of our csvs (can also pass BriteDataFrame/PreparedDataFrame)...
contoso.set_data_sources(source=CsvSource(DF_ROOT), prepared_source=CsvSource(DF_PREP))
# Easy handling of dataframes, works same for both csv and britedataframe sources.
# Essentially a wrapper around the pandas DataFrame. Dates parsed automatically.
contoso.frames.get('property_items')
contoso.frames.get('agencies').df # original dataframe
# Import BriteCore reports. Don't have to open/change/save columns in excel, hyperlinks and other
# formatting issues are handled. Don't even have to rename the file to take out the dates.
from brite_etl.core.io import import_report
adv_prem = import_report('/tmp/input', 'Advance Premium', sheet='Advance Premium List', skip_rows=2) # Pandas DataFrame
contoso.frames.set('ap', df=adv_prem) # Make custom frames in your frame set
# Define frame-specific operations...
contoso.frames.get('prepared.lines').endOfMonthSum()
# Or use universal operations, chain across multiple frames...
_contoso = contoso.chain
(_contoso
.filter_dates('date filter for multiple frames actually isn\'t done yet (soon, though)')
.hash_cols(['policyId']) # MD5 hashed dataframes
.export_excel(
path='/tmp/output',
file_name='end_month_integrity_hash.xlsx'
) # Every frame is put into it's own sheet during export
.run()
)
# Computations make use of multiple frames within a frame set (also chainable)...
trans = _contoso.get_item_transactions().value()
# Create multiple, isolated sets of frames...
wrk = brite_etl.lib.FrameSet('working', from_set=contoso)
Installation
pip install brite_etl
Development
To run the all tests run:
tox
Test just your desired python version with tox -e py27 or tox -e py35. Much faster than running all test envirornments.
Note about testing: some of the tests require real df_cache data to run. The locations for the df_cache directories is defined in the setup.cfg file. When running, the tests will check to make sure the directories exist and contain files. If they don’t those tests will be skipped, the rest of the tests should function like normal.
Changelog
0.1.0 (2016-10-03)
Update docs
Femove pypy env
Use semantic versioning
0.0.1 (2016-10-02)
First release on PyPI.
Metadata
Release files for brite_etl 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brite_etl-0.1.1.tar.gz | 40.9 kB | Without provenance | Details for brite_etl-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brite_etl-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for brite_etl-0.1.1-py2.py3-none-any.whl |
Total release size: 94.9 kB
Release files / brite_etl-0.1.1.tar.gz
| Download URL | brite_etl-0.1.1.tar.gz |
|---|---|
| Size | 40.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75d3dc42052873d76e820e33203f53bf24f6f611616950a6d988c8703a399415
|
|
BLAKE2b-256 checksum How to use checksums |
699975daffc4b8668bc0b1a0d8ecd153bf335154bf9cbe5249670b1c76d2a7fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / brite_etl-0.1.1-py2.py3-none-any.whl
| Download URL | brite_etl-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 53.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
541f9f8e38b9f6c156176214fc8a5ea35a005829eb965709d2e5c2ca95aac2b3
|
|
BLAKE2b-256 checksum How to use checksums |
d229dbe75356c17838603249e738a8d8e2655f752214101f776fd367f10ffa0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for brite_etl 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.