Metadata-Version: 2.1
Name: dagster-toolbox
Version: 0.0.15
Summary: A set of tools to ease Dagster usage
Home-page: https://nicolasramy.github.io/dagster-toolbox/
Author: Nicolas RAMY
Author-email: nicolas.ramy@darkelda.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dagster==1.6.13
Requires-Dist: dagster-aws==0.22.13
Requires-Dist: dagster-pandas==0.22.13
Requires-Dist: dagster-pandera==0.22.13
Requires-Dist: dagster-postgres==0.22.13
Requires-Dist: google-api-python-client==2.123.0
Requires-Dist: hvac==2.1.0
Requires-Dist: minio==7.2.5
Requires-Dist: oauth2client==4.1.3
Requires-Dist: pandas==2.2.1
Requires-Dist: python-slugify==8.0.4
Requires-Dist: requests==2.31.0
Requires-Dist: SQLAlchemy==2.0.29

# Dagster Toolbox
A set of tools to ease Dagster usage

## Requirements

- Python 3.10+
- Dagster 1.6.13 / 0.22.13

## Installation

```shell
pip install dagster-toolbox
```

## Usage

#### New object storage resource

Declare resource

```python
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

```python
@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)    
    ...

```
