The Logichub Integration SDK
Project description
lhub_integ
Python package to shim basic scripts to work with integration machinery. This package requires Python 3.6:
# Optional: install Python 3.6 with pyenvv
brew install pyenv
pyenv install 3.6.6
pyenv init # Follow the instructions
pyenv local 3.6.6
python --version
pip install lhub_integ
Usage (as an integration writer)
To write a Python script that is convertible into an integration:
- Create a directory that will contain your integration
- Install lhub_integ as a local package:
pip install lhub_integ
Python scripts must provide an entrypoint function with some number of arguments. These arguments will correspond to columns in the input data. The function should return a Python dictionary that can be serialized to JSON
def process(url, num_bytes: int):
return {'output': url + 'hello'}
Specifying Dependencies
You must create a requirements.txt
file specifying your dependencies. To create a dependency bundle run:
$ bundle-requirements
This script is provided when you install lhub_integ.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lhub_integ-0.1.4.tar.gz
(9.4 kB
view hashes)
Built Distribution
lhub_integ-0.1.4-py3-none-any.whl
(27.9 kB
view hashes)
Close
Hashes for lhub_integ-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9040e3543612e2bc5399c5f7be44bf384e8c8ef818b5c1a51f47901ff6eecef6 |
|
MD5 | e0336491e6d6b529ac6f4affaca4a320 |
|
BLAKE2b-256 | c6157727dca6531c767b8ac78120f56e1aac0b8fb9c2efb2d39018edce2b9d57 |