Python Client - Validate API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-validate-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_validate_api_client
from cloudmersive_validate_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# create an instance of the API class
api_instance = cloudmersive_validate_api_client.DomainApi()
domain = 'cloudmersive.com' # str | Domain name to check, for example \"cloudmersive.com\".  The input is a string so be sure to enclose it in double-quotes.

# Configure API key authorization: Apikey

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = 'f0c513bc-8c00-4491-830e-3e83b015feb6'

try:
    # Validate a domain name
    api_response = api_instance.domain_check(domain)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DomainApi->domain_check: %s\n" % e)


Sample Application

Download Sample

You can also download our sample application from GitHub.

Python Client - Security API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-security-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_security_api_client
from cloudmersive_security_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# Configure API key authorization: Apikey
configuration = cloudmersive_security_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'



# create an instance of the API class
api_instance = cloudmersive_security_api_client.ContentThreatDetectionApi(cloudmersive_security_api_client.ApiClient(configuration))
value = 'value_example' # str | User-facing text input.

try:
    # Automatically detect threats in an input string
    api_response = api_instance.content_threat_detection_automatic_threat_detection_string(value)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ContentThreatDetectionApi->content_threat_detection_automatic_threat_detection_string: %s\n" % e)


Python Client - Image Recognition and Processing API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-image-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_image_api_client
from cloudmersive_image_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

api_instance = cloudmersive_image_api_client.FaceApi()
image_file = 'C:\\temp\\input.jpg' # file | Image file to perform the operation on.  Common file formats such as PNG, JPEG are supported.

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = 'f0c513bc-8c00-4491-830e-3e83b015feb6'

try:
    # Crop image to face (square)
    api_response = api_instance.face_crop_first(image_file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FaceApi->face_crop_first: %s\n" % e)




Python Client - Natural Language Processing (NLP) API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-nlp-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_nlp_api_client
from cloudmersive_nlp_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# create an instance of the API class
api_instance = cloudmersive_nlp_api_client.ExtractEntitiesStringApi()
value = 'Cloudmersive is a leader in Highly Scalable Cloud APIs.' # str | Input string

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = '04d1a7be-c9d1-4d93-8ec4-e7545c2a570a'

try:
    # Extract entities from string
    api_response = api_instance.extract_entities_string_post(value)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtractEntitiesStringApi->extract_entities_string_post: %s\n" % e)




Python Client - Data Integration API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-dataintegration-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_dataintegration_api_client
from cloudmersive_dataintegration_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# Configure API key authorization: Apikey
configuration = cloudmersive_dataintegration_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'



# create an instance of the API class
api_instance = cloudmersive_dataintegration_api_client.BackupConvertApi(cloudmersive_dataintegration_api_client.ApiClient(configuration))
input_file = '/path/to/inputfile' # file | Input file to perform the operation on (optional)

try:
	# Lists all tables stored in a SQL Server Backup (.BAK) file
	api_response = api_instance.dataintegration_backup_convert_mssql_bak_get_tables_post(input_file=input_file)
	pprint(api_response)
except ApiException as e:
	print("Exception when calling BackupConvertApi->dataintegration_backup_convert_mssql_bak_get_tables_post: %s\n" % e)




Python Client - Currency API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-currency-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_currency_api_client
from cloudmersive_currency_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# Configure API key authorization: Apikey
configuration = cloudmersive_currency_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_currency_api_client.CurrencyExchangeApi(cloudmersive_currency_api_client.ApiClient(configuration))
source = 'source_example' # str | Source currency three-digit code (ISO 4217), e.g. USD, EUR, etc.
destination = 'destination_example' # str | Destination currency three-digit code (ISO 4217), e.g. USD, EUR, etc.
source_price = 1.2 # float | Input price, such as 19.99 in source currency

try:
	# Converts a price from the source currency into the destination currency
	api_response = api_instance.currency_exchange_convert_currency(source, destination, source_price)
	pprint(api_response)
except ApiException as e:
	print("Exception when calling CurrencyExchangeApi->currency_exchange_convert_currency: %s\n" % e)




Python Client - Convert API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-convert-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_convert_api_client
from cloudmersive_convert_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# create an instance of the API class
api_instance = cloudmersive_convert_api_client.ConvertDataApi()
input_file = 'C:\\temp\\input.csv' # file | Input file to perform the operation on.

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = '04d1a7be-c9d1-4d93-8ec4-e7545c2a570a'

try:
    # CSV to JSON conversion
    api_response = api_instance.convert_data_csv_to_json(input_file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConvertDataApi->convert_data_csv_to_json: %s\n" % e)




Python Client - OCR API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-ocr-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_ocr_api_client
from cloudmersive_ocr_api_client.rest import ApiException
 

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

api_instance = cloudmersive_ocr_api_client.ImageOcrApi()
image_file = 'C:\\temp\\input.jpg' # file | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = '04d1a7be-c9d1-4d93-8ec4-e7545c2a570a'

try:
    # Converts an uploaded image in common formats such as JPEG, PNG into text via Optical Character Recognition.
    api_response = api_instance.image_ocr_post(image_file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImageOcrApi->image_ocr_post: %s\n" % e)




Python Client - Barcode API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-barcode-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_barcode_api_client
from cloudmersive_barcode_api_client.rest import ApiException

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# create an instance of the API class
api_instance = cloudmersive_barcode_api_client.BarcodeLookupApi()
value = 'value_example' # str | Barcode value

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = '04d1a7be-c9d1-4d93-8ec4-e7545c2a570a'

try:
    # Lookup a barcode value and return product data
    api_response = api_instance.barcode_lookup_ean_lookup(value)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BarcodeLookupApi->barcode_lookup_ean_lookup: %s\n" % e)




Python Client - Video and Media Services API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-video-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_video_api_client
from cloudmersive_video_api_client.rest import ApiException

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

from __future__ import print_function
import time
from pprint import pprint

# Configure API key authorization: Apikey
configuration = cloudmersive_video_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'



# create an instance of the API class
api_instance = cloudmersive_video_api_client.VideoApi(cloudmersive_video_api_client.ApiClient(configuration))
input_file = '/path/to/inputfile' # file | Input file to perform the operation on.
file_url = 'file_url_example' # str | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB. (optional)
max_width = 56 # int | Optional; Maximum width of the output video, up to the original video width. Defaults to original video width. (optional)
max_height = 56 # int | Optional; Maximum height of the output video, up to the original video width. Defaults to original video height. (optional)
preserve_aspect_ratio = true # bool | Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true. (optional)
frame_rate = 56 # int | Optional; Specify the frame rate of the output video. Defaults to original video frame rate. (optional)
quality = 56 # int | Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50. (optional)
extend_processing_time = true # bool | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes. (optional)

try:
	# Convert Video to MP4 format.
	api_response = api_instance.video_convert_to_mp4(input_file, file_url=file_url, max_width=max_width, max_height=max_height, preserve_aspect_ratio=preserve_aspect_ratio, frame_rate=frame_rate, quality=quality, extend_processing_time=extend_processing_time)
	pprint(api_response)
except ApiException as e:
	print("Exception when calling VideoApi->video_convert_to_mp4: %s\n" % e)




Python Client - Virus API

Step 1 - Add the Client with the PIP Package Manager

Install it using pip install:

pip install cloudmersive-virus-api-client

Step 2 - Create an API Client object with API Key

Import the API Client package by adding this line to the top of your .py file:

import cloudmersive_virus_api_client
from cloudmersive_virus_api_client.rest import ApiException

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

# create an instance of the API class
api_instance = cloudmersive_virus_api_client.ScanApi()
input_file = 'C:\\Temp\\input.csv' # file | Input file to perform the operation on.

api_instance.api_client.configuration.api_key = {}
api_instance.api_client.configuration.api_key['Apikey'] = '04d1a7be-c9d1-4d93-8ec4-e7545c2a570a'

try:
    # Scan a file for viruses
    api_response = api_instance.scan_file(input_file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScanApi->scan_file: %s\n" % e)




800 free API calls/month, no credit card required

Get started now!