Skip to main content

Handset Detection Python API kit

Project description

HandsetDetection Python API kit

:Author: Troy Farrell <>
:Copyright: 2009, 2013 Teleport Corp Pty Ltd.
:License: see the file LICENSE

This is a Python module exposing the Handset Detection API version 2.0. If you
aren't sure what that means, please visit and then
read this document.


The API for is quite simple. There are four available
methods: detect, model, track, and vendor.

detect(data, options)
Get device information and capabilities given sufficient idenifying
information, such as a user-agent or x-wap-profile.

data - a dictionary containing a User-Agent, IP address, x-wap-profile,
and any other information that may be useful in identifying the
options - a string or list of options to be returned from your query,
e.g., "geoip,product_info,display" or ["geoip",
"product_info"], etc.

Get a list of models for a given vendor.

Track a series of requests from a user. Tracking requests allows you to
get better statistics from

data - a dictionary containing a User-Agent, IP address, x-wap-profile,
and any other information that may be useful in identifying the

Get a list of handset vendors.

You should also know about two methods of this API interface:

Set a new API key. This is only necessary if you wish you use a new API
key or have modified this package in a significant way.

set_credentials(username, secret)
Your username is the e-mail address you used when you signed up at

The secret is the secret shown in your profile. It's your API version
2.0 secret - not your API version 1.0 APIKey.

For convenience, these methods are exposed as functions on the handsetdetection
package. Should you desire additional flexibility, use the methods on the
handsetdetection.HandsetDetection class.


There are four examples describing the module's use in the examples directory::
Detect a mobile device and display the click-to-call and send-sms strings
for the device.
Detect a mobile device and redirect it to a new URL.
For a given mobile device vendor, display known models.
Display known mobile device vendors.

Developing This Package

The following tools may be helpful to anyone furthering the development of this Python package::

* docutils
* Nose (nosetests)
* pylint
* setuptools

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for handsetdetection, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size handsetdetection-1.1.tar.gz (22.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page