Disruptive Technologies Python Integrations.
Project description
Disruptive Technologies Python Integrations
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
Built Distribution
File details
Details for the file dtintegrations-0.6.1.tar.gz
.
File metadata
- Download URL: dtintegrations-0.6.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c26b657b264149860999c2c672579c464ad45d6ea27ed30c44df9dbe78eb33ce |
|
MD5 | f33997689774c53be3194c980ad2f4d5 |
|
BLAKE2b-256 | dc551db90fb7f649caf0e02cfc8073967da991432c28f6390865dca664d6dcf8 |
File details
Details for the file dtintegrations-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: dtintegrations-0.6.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7242addd4303e2198bd9bb8d2cff1dfc9539798b8600f6089ae49ef0b5e84fb5 |
|
MD5 | c018a4e8660d8ae2f48205199788ce02 |
|
BLAKE2b-256 | 8884b4d61a5bc72787bdca3842634912b18d9ceba66ca41513196cf1fc716b55 |