Skip to main content

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:

  1. Create a directory that will contain your integration
  2. 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)

  1. Bump the version in pyproject.toml

  2. poetry publish --build

Project details


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-1.0.13.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

lhub_integ-1.0.13-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file lhub_integ-1.0.13.tar.gz.

File metadata

  • Download URL: lhub_integ-1.0.13.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.0.0

File hashes

Hashes for lhub_integ-1.0.13.tar.gz
Algorithm Hash digest
SHA256 739b93236eecd077d45f7b6329cce39e459597f70b95b3798df0a61fba918832
MD5 30858e5e15d137ffb78dd4846d3ea3d3
BLAKE2b-256 02a4a91cf8e6537627813c525a9789321993d913698d0ede1ba3de7b92ac08e4

See more details on using hashes here.

File details

Details for the file lhub_integ-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: lhub_integ-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.0.0

File hashes

Hashes for lhub_integ-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 e93be788dabc783e81391eeb7bf6df5c39fb56228a305d7a09953243f922c21c
MD5 9ac6e4ac485f2901eb1f8fb0bcfbb36f
BLAKE2b-256 780a2960c5db3a0d295eb62e653211d6778904e0ce23229d446a3e6f62407a69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page