Skip to main content

Disruptive Technologies Python Integrations.

Project description

Disruptive Technologies Python Integrations

build codecov

Documentation

Installation

The package can be installed through pip:

pip install --upgrade dtintegrations

or from source:

pip install .

Requirements

  • Python 3.8, 3.9, 3.10, 3.11

Usage

Currently, the main functionality of this package is validating requests forwarded by a Data Connector.

The following example shows this for a Google Cloud Function.

from dtintegrations import data_connector, provider


def endpoint(request):
    # Validate and decode the incoming request.
    payload = data_connector.HttpPush.from_provider(
        request=request,
        provider=provider.GCLOUD,
        secret='<SIGNATURE_SECRET>',
    )

    # Print the payload data.
    print(payload)

    # If all is well, return 200 response.
    return ('OK', 200)

Examples

A few examples has been provided, but must be run either on a serverless platform or locally with a combination or ngrok and the appropriate development framework.

Exceptions

If a method is unsuccessful or has been provided with invalid parameters, an exception is raised. A list of available exceptions are available in the API Reference.

Development

Set up the development virtualenv environment:

make

Run unit-tests against the currently active python version:

make test

Lint the package code using MyPy and flake8:

make lint

Build the package distribution:

make 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

dtintegrations-0.6.0.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

dtintegrations-0.6.0-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

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