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

Uploaded Source

Built Distribution

lhub_integ-1.0.2-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lhub_integ-1.0.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.6 Darwin/18.7.0

File hashes

Hashes for lhub_integ-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ced31758b36ee94fd1a3028b6ea12d82ffc8c9e6890cc5917df30af6f9fe9e2d
MD5 d89e1da3d77ada74a34fe0d74c45bc48
BLAKE2b-256 8c2e1cc5d7472fc8ce916bf76073300b687d7a6da49ec6574f315fd8004b71a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lhub_integ-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.6 Darwin/18.7.0

File hashes

Hashes for lhub_integ-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59989f5855d690cdd00b602b17c59a384d2ab96ed6f7b6612f82303df8b6dfa6
MD5 9bd89a592385bd12429727b311722e99
BLAKE2b-256 471c9cdfa3feba0c52f0128c62e9b0513e70da5ec54229876034f13160a93f65

See more details on using hashes here.

Supported by

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