===============================
:Author: Troy Farrell <troy@entheossoft.com>
: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 http://handsetdetection.com/ and then
read this document.
API
---
The API for handsetdetection.com 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
handset
options - a string or list of options to be returned from your query,
e.g., "geoip,product_info,display" or ["geoip",
"product_info"], etc.
model(vendor)
Get a list of models for a given vendor.
track(data)
Track a series of requests from a user. Tracking requests allows you to
get better statistics from handsetdetection.com.
data - a dictionary containing a User-Agent, IP address, x-wap-profile,
and any other information that may be useful in identifying the
handset
vendor()
Get a list of handset vendors.
You should also know about two methods of this API interface:
set_v2_apikey(apikey)
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
handsetdetection.com.
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.
Examples
--------
There are four examples describing the module's use in the examples directory::
detect.py
Detect a mobile device and display the click-to-call and send-sms strings
for the device.
detect_and_redirect.py
Detect a mobile device and redirect it to a new URL.
model.py
For a given mobile device vendor, display known models.
vendor.py
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
Metadata
Release files for handsetdetection 1.1
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 |
|---|---|---|---|---|
| handsetdetection-1.1.tar.gz | 22.0 kB | Without provenance | Details for handsetdetection-1.1.tar.gz |
Release files / handsetdetection-1.1.tar.gz
| Download URL | handsetdetection-1.1.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3eee448ff04fd642f9da78a33d8b22287f1d441964e07f4a614862d2b8f3331c
|
|
BLAKE2b-256 checksum How to use checksums |
d2735f03440630d281e5ccc37366b860cad454efb2cbf30971c51f04ffa407ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for handsetdetection 1.1
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.