Skip to content

stitchdata/python-stitch-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-stitch-client

A Stitch Import API client library for python

Use

This library depends on python3 - if that's not your default python, try this:

› mkvirtualenv -p python3 stitch

Next, install this library:

› workon stitch
› pip install stitchclient

Set your environment variables:

export STITCH_CLIENT_ID=<your_stitch_client_id>
export STITCH_TOKEN=<your_stitch_import_token>
export STITCH_REGION=<us|eu> # defaults to us

Now you're ready to use the library. From the same virtualenv:

from stitchclient.client import Client

with Client(
    os.environ['STITCH_CLIENT_ID'],
    os.environ['STITCH_TOKEN'],
    os.environ['STITCH_REGION'],
    callback_function=print,
) as client:
    for i in range(1, 10):
        client.push({
            'action': 'upsert',
            'table_name': 'test_table',
            'key_names': ['id'],
            'sequence': i,
            'data': {
                'id': i,
                'value': 'abc',
            },
        }, i)

License

python-stitch-client is Copyright © 2016 Stitch and Distributed under the Apache License Version 2.0

transit-python is Copyright © 2014-2016 Cognitect and Distributed under the Apache License Version 2.0

About

A python client library for the Stitch Import API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages