Skip to content

Instantly share code, notes, and snippets.

@bartaelterman
Created April 29, 2019 07:25
Show Gist options
  • Save bartaelterman/404b4f0dde339c60749fb3e2f7af8150 to your computer and use it in GitHub Desktop.
Save bartaelterman/404b4f0dde339c60749fb3e2f7af8150 to your computer and use it in GitHub Desktop.
Intake custom driver
import intake
class WritableTextFilesSource(intake.source.TextFilesSource):
container = 'python'
name = 'writabletext'
partition_access = True
version = '0.0.1dev'
def write(self):
print('writing')
metadata:
version: 1
sources:
example:
description: test
driver: writabletext
args:
urlpath: "test.csv"
col1 col2
1 one
2 two
3 three
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