cloudmersive_spam_api_client
Easily and directly scan and block spam security threats in input.
This Python package provides a native API client for Cloudmersive Spam Detection API
- API version: v1
- Package version: 3.0.5
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import cloudmersive_spam_api_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import cloudmersive_spam_api_client
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import cloudmersive_spam_api_client
from cloudmersive_spam_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Apikey
configuration = cloudmersive_spam_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Apikey'] = 'Bearer'
# create an instance of the API class
api_instance = cloudmersive_spam_api_client.SpamDetectionApi(cloudmersive_spam_api_client.ApiClient(configuration))
model = 'Advanced' # str | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. (optional) (default to Advanced)
preprocessing = 'Auto' # str | Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. (optional) (default to Auto)
allow_phishing = false # bool | True if phishing should be allowed, false otherwise (optional) (default to false)
allow_unsolicited_sales = false # bool | True if unsolicited sales should be allowed, false otherwise (optional) (default to false)
allow_promotional_content = true # bool | True if promotional content should be allowed, false otherwise (optional) (default to true)
custom_policy_id = 'custom_policy_id_example' # str | Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud (optional)
input_file = '/path/to/file.txt' # file | (optional)
try:
# Perform advanced AI spam detection and classification against input text file.
api_response = api_instance.spam_detect_file_advanced_post(model=model, preprocessing=preprocessing, allow_phishing=allow_phishing, allow_unsolicited_sales=allow_unsolicited_sales, allow_promotional_content=allow_promotional_content, custom_policy_id=custom_policy_id, input_file=input_file)
pprint(api_response)
except ApiException as e:
print("Exception when calling SpamDetectionApi->spam_detect_file_advanced_post: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.cloudmersive.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| SpamDetectionApi | spam_detect_file_advanced_post | POST /spam/detect/file/advanced | Perform advanced AI spam detection and classification against input text file. |
| SpamDetectionApi | spam_detect_file_post | POST /spam/detect/file | Perform AI spam detection and classification on an input image or document (PDF or DOCX) |
| SpamDetectionApi | spam_detect_form_submission_advanced_post | POST /spam/detect/form-submission/advanced | Perform advanced AI spam detection and classification against a form submission |
| SpamDetectionApi | spam_detect_text_string_advanced_post | POST /spam/detect/text-string/advanced | Perform advanced AI spam detection and classification against input text string |
| SpamDetectionApi | spam_detect_text_string_post | POST /spam/detect/text-string | Perform AI spam detection and classification against input text string |
Documentation For Models
- SpamDetectionAdvancedFormField
- SpamDetectionAdvancedFormSubmissionRequest
- SpamDetectionAdvancedRequest
- SpamDetectionAdvancedResponse
- SpamDetectionFormSubmissionAdvancedResponse
- SpamDetectionRequest
- SpamDetectionResponse
Documentation For Authorization
Apikey
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header
Author
Metadata
Release files for cloudmersive-spam-api-client 3.0.5
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 |
|---|---|---|---|---|
| cloudmersive_spam_api_client-3.0.5.tar.gz | 25.9 kB | Without provenance | Details for cloudmersive_spam_api_client-3.0.5.tar.gz |
Release files / cloudmersive_spam_api_client-3.0.5.tar.gz
| Download URL | cloudmersive_spam_api_client-3.0.5.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62a4f69361788effa46ef9a28947bf82bdc3fe2ae20c9ffdb6ea6d2361bb6737
|
|
BLAKE2b-256 checksum How to use checksums |
9dcf24c4674110359102a471ce61d18257d2962022009c773b79cdd0ce95c7c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for cloudmersive-spam-api-client 3.0.5
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.