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.
Publishing
You will need the PyPi username and password that are in 1Password (search for PyPi)
-
Bump the version in pyproject.toml
-
poetry publish --build
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
Built Distribution
Hashes for lhub_integ-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967b20d3659bc8345e0741804d3fa602476ee15ba73e29e6ecfb6a82ed630a5b |
|
MD5 | 71c2811c2dfddb5569faf0b453371d87 |
|
BLAKE2b-256 | af9e669fbc4b34b93e0e46550b5c7ad6258aa0427385a5667dc23b33c53d4a2c |