[](https://travis-ci.org/messagemedia/signingkeys-python-sdk)
[](https://badge.fury.io/py/messagemedia-signingkeys-sdk)
The MessageMedia Signature Key API provides a number of endpoints for managing key used to sign each unique request to ensure security and the requests can't (easily) be spoofed. This is similar to using HMAC in your outbound messaging (rather than HTTP Basic).
## ⭐️ Install via PIP
Run the following command to install the SDK via pip:
`pip install messagemedia-signingkeys-sdk`
## 🎬 Get Started
It's easy to get started. Simply enter the API Key and secret you obtained from the [MessageMedia Developers Portal](https://developers.messagemedia.com) into the code snippet below.
### 🚀 Create a signature key
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
body_value = "{ \"digest\": \"SHA224\", \"cipher\": \"RSA\" }"
body = json.loads(body_value)
result = signature_key_management_controller.create_signature_key(body)
```
### 📥 Get signature key details
You can get a key_id by looking at the id of the signature key created from the response of the above example.
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
key_id = 'key_id'
result = signature_key_management_controller.get_signature_key_detail(key_id)
```
### 📥 Get signature keys list
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
result = signature_key_management_controller.get_signature_key_list()
```
### ❌ Delete signature key
You can get the key_id by looking at the ids of the signature keys returned from the response of the `Get signature keys list` example.
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
key_id = 'key_id'
signature_key_management_controller.delete_signature_key(key_id)
```
### ☑️ Enable a signature key
You can get the key_id by looking at the ids of the signature keys returned from the response of the `Get signature keys list` example.
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
body = EnableSignatureKeyRequest({
"key_id": "7ca628a8-08b0-4e42-aeb8-960b37049c31"
})
result = signature_key_management_controller.update_enable_signature_key(body)
```
### 📥 Get enabled signature key
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
result = signature_key_management_controller.get_enabled_signature_key()
```
### 🚫 Disable an enabled signature key
```python
from message_media_signing_keys.message_media_signing_keys_client import MessageMediaSigningKeysClient
# Configuration parameters and credentials
basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication
basic_auth_password = 'basic_auth_password' # The password to use with basic authentication
client = MessageMediaSigningKeysClient(basic_auth_user_name, basic_auth_password)
signature_key_management_controller = client.signature_key_management
signature_key_management_controller.delete_disable_the_current_enabled_signature_key()
```
## 📕 Documentation
Check out the [full API documentation](DOCUMENTATION.md) for more detailed information.
## 😕 Need help?
Please contact developer support at developers@messagemedia.com or check out the developer portal at [developers.messagemedia.com](https://developers.messagemedia.com/)
## 📃 License
Apache License. See the [LICENSE](LICENSE) file.
Metadata
Release files for messagemedia-signingkeys-sdk 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| messagemedia_signingkeys_sdk-1.1.0.tar.gz | 23.9 kB | Without provenance | Details for messagemedia_signingkeys_sdk-1.1.0.tar.gz |
Release files / messagemedia_signingkeys_sdk-1.1.0.tar.gz
| Download URL | messagemedia_signingkeys_sdk-1.1.0.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8549a482083cc149ce306fc709dee142f4ff3af1fd4b428a327cab7faf9c44cd
|
|
BLAKE2b-256 checksum How to use checksums |
768f8609646ff0c37bedec5e30cfeab1ac8a303522388c913f401b6ee9bfb165
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for messagemedia-signingkeys-sdk 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.