Metadata-Version: 2.1
Name: formsg-python-sdk
Version: 0.1.8
Summary: Python SDK for Forms
Home-page: UNKNOWN
Author: Open Government Products
Author-email: chinying@open.gov.sg
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
Requires-Dist: PyNaCl (>=1.5.0)
Requires-Dist: requests (>=2.27.0)
Requires-Dist: typing-extensions (>=3.10.0.0) ; python_version < "3.10"

# formsg-python-sdk

## Quickstart
`pip install formsg-python-sdk`

you may also additionally need to run `pip install typing_extensions`

```
FORM_SECRET_KEY = "YOUR-SECRET-KEY"


import formsg
sdk = formsg.FormSdk("PRODUCTION")  # accepts STAGING or PRODUCTION

# decryption
decrypted = sdk.decrypt(FORM_SECRET_KEY, encrypted_payload)

# webhook authentication
header = "req.header.'x-formsg-signature'"
sdk.authenticate(header=HEADER_RESP, uri='your-webhook-uri')

# decryption with attachments
decrypted = sdk.decrypt_attachments(FORM_SECRET_KEY, encrypted_payload)
```

