Created
April 29, 2019 07:25
-
-
Save bartaelterman/404b4f0dde339c60749fb3e2f7af8150 to your computer and use it in GitHub Desktop.
Intake custom driver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import intake | |
class WritableTextFilesSource(intake.source.TextFilesSource): | |
container = 'python' | |
name = 'writabletext' | |
partition_access = True | |
version = '0.0.1dev' | |
def write(self): | |
print('writing') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metadata: | |
version: 1 | |
sources: | |
example: | |
description: test | |
driver: writabletext | |
args: | |
urlpath: "test.csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
col1 | col2 | |
---|---|---|
1 | one | |
2 | two | |
3 | three |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from intake import open_catalog | |
import sys | |
print(sys.path) | |
cat = open_catalog('intake_test_catalog.yaml') | |
cat.example.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment