Skip to main content

mobi.devices

See documentation at http://mobi.infrae.com/.

mobi.devices is a set of tools that detect mobile user agents. It uses the WURFL database as well as data from the MIT mobile project.

It provides WSGI middleware that can tag a request with information about the device performing the request.

For best performance, please install pytc. It is not a package requirement since it is not available on all platforms.

Paster example configuration:

[app:yourapp]
# This part describes your application
# use = ...

[filter:mobidevicedetection]
# The entry point to use the classifier
use = egg:mobi.devices#classifier
# cache the classification on a client side cookie (default: true)
cookie_cache = true
# Configure caching (see beaker documentation)
cache.type = ext:memcached
cache.url = 127.0.0.1:11211
cache.lock_dir = /tmp/mobicache
# Data directory *required*. make sure directory is writable
# by the user that run the webserver
var = /var/mobi/db
# Path to wurfl file. by default it uses the one shipped with
# this package. however you should use the latest one.
wurfl_file = /var/mobi/wurfl.xml.gz

[filter:mobirouter]
use = egg:mobi.devices#router
# Redirect mobile devices that connect to infrae.com hostname
# to m.infrae.com
infrae.com = http://m.infrae.com/

[pipeline:main]
# This part configures the actual WSGI stack
pipeline = mobidevicedetection mobirouter yourapp

[server:main]
# This is the configuration for the paster web server.
# It must have the same name as the pipeline.
use = egg:Paste#http
host = 0.0.0.0
port = 8080
threadpool_workers = 7

If you are using Apache with rewrite rules that modify the path and you want the router to route on the original path, please add the following rule before any rewrite rule

RewriteRule ^(.*)$ - [E=ORIGINAL_PATH:$1]
RequestHeader set X_ORIGINAL_PATH %{ORIGINAL_PATH}e

Changelog

mobi.devices 1.2 (2011-04-14)

  • add more configuration options (Bruno Binet)

mobi.devices 1.1 (2010-12-20)

  • add original path http header handler to make router work with rewrite rules.

  • add simple router middleware.

mobi.devices 1.0.1 (2010-09-14)

  • fix wurfl file configuration handling

  • fix missing import

mobi.devices 1.0 (2010-09-13)

  • Add new engine for wurfl

mobi.devices 1.0b1 (2010-07-14)

  • first release, see README.txt

Metadata

Release files for mobi.devices 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobi.devices 1.2
File Size Uploaded Provenance Actions
mobi.devices-1.2.tar.gz 938.4 kB Without provenance Details for mobi.devices-1.2.tar.gz

Release files / mobi.devices-1.2.tar.gz

Download URL mobi.devices-1.2.tar.gz
Size 938.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3227c2f14e570728aad2fedf93ffb1e8769183ab1faa09679a4eac8d65f819cb
BLAKE2b-256 checksum
How to use checksums
ef6e9e80cc80344da10c98d5e7758912da4d83eaa451a05db72d67ef706d958d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mobi.devices 1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page