A set of tools to ease Dagster usage
Project description
Dagster Toolbox
A set of tools to ease Dagster usage
Requirements
- Python 3.10+
- Dagster 1.1.5 / 0.17.5
Installation
pip install dagster-toolbox
Usage
New object storage resource
Declare resource
from dagster_toolbox.resources import ObjectStorage
class Analytics(ObjectStorage):
bucket = "analytics"
@resource
def analytics_objects(init_context):
return Analytics()
RESOURCE_DEFS = {
"analytics_objects": analytics_objects,
}
Use resource
@asset
def export_files(context):
partition_key = context.asset_partition_key_for_output()
file_path = f"analytics/data/{partition_key}"
file_resource = context.resource.analytics_objects.read(file_path)
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dagster-toolbox-0.0.10.tar.gz
(15.5 kB
view hashes)
Built Distribution
Close
Hashes for dagster_toolbox-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab770b7f77ae360f668aaf7f456e40615a841faf1fd5050cebbef256635ed25 |
|
MD5 | af7337ea2847d562b1cee24657c064a1 |
|
BLAKE2b-256 | 10d1938a794e1a70dc19a8f85f77d7f66aaff7ffa2f98875aa43dca225dd0fe8 |