blaze / blaze/odo

Allow customization of resource functions without having to write a new resource function

Open
#164 0 comments 0 reactions 1 assignee Claimed by @cpcloud View on GitHub
enhancement
Dominant language
Python
Stars
1k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

It'd be swell if there was a way for users to use existing types or other `resource` functions to dispatch on regexs that don't have a `resource` function associated with them.

One example is here: https://github.com/ContinuumIO/blaze/issues/1011

I proposed this syntax:

``` python
resource('*.log.gz', cls=chunks(CSV))
```

but that won't really work for things whose construction is more complicated, hence the "... other `resource` functions ..." statement above. Maybe something like this:

``` python
resource('*.log.gz', construct_as=chunks(CSV))
resource('*.log.gz', construct_as='*.csv.gz')
resource('*.log.gz', construct_as='*.json.gz')
```

?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.