This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Detect browser

import redis
import browscap
from browscap.cache.redis import RedisCache

ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
redis_cache = redis.Redis(db=5)
bc = browscap.Browscap(cache=RedisCache(redis_cache))
browser=bc.get_browser(ua)

Detect browser with asyncio

from pprint import pprint
import asyncio
import asyncio_redis
from browscap.aio import BrowscapAsync
from browscap.aio.cache.redis import RedisPoolAioCache

loop = asyncio.get_event_loop()

@asyncio.coroutine
def get_browser():
    ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"

    redis_cache = await aioredis.create_pool(('localhost', 6379), minsize=5, maxsize=100)
    bc = BrowscapAsync(cache=RedisPoolAioCache(redis_cache))
    browser = yield from bc.get_browser(ua)

    cache.close_connection()
    return browser


if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    browser = loop.run_until_complete(get_browser())
    pprint(browser)

Update base

import redis
import browscap
from browscap.cache.redis import RedisCache
from browscap import IniLoader

redis_cache = redis.Redis(db=5)
bc = browscap.Browscap(cache=RedisCache(redis_cache))
bc.update(type=IniLoader.PHP_INI_FULL)
Release History

Release History

0.0.13

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.12

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
browscap-python-0.0.13.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source Jul 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting