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.6.13 / 0.22.13
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.14.tar.gz
(15.6 kB
view hashes)
Built Distribution
Close
Hashes for dagster_toolbox-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a33727cf3cfa396addd1c092273fc8af7bbed5a0214cb62ee2c272e7bdc5df1e |
|
MD5 | b01e4cdf056c59784dbe9d3f4228b35c |
|
BLAKE2b-256 | 4a832aaee14c3487fca459547621afa5a1b4da268df3c665f14ec085b8de5eb9 |