GithubHelp home page GithubHelp logo

urbanairship's Introduction

About

urbanairship is a Python library for using the Urban Airship web service API for push notifications and rich app pages.

Requirements

As of version 0.6, Python 2.6 or 2.7 is required. Python 3.3 support will follow.

Functionality

Version 0.6 is a major upgrade, focusing on support for the new version 3 push API. There has also been a major reorganization of the codebase.

  • device token registration
  • basic push
  • registering and pushing with tags
  • broadcast
  • feedback service
  • device token deactivation (deregistration)
  • device token listing
  • rich push
  • scheduled notifications

Usage

See the full documentation, as well as the Urban Airship API Documentation.

Simple iOS Push

>>> import urbanairship as ua
>>> airship = ua.Airship('application_key','master_secret')
>>> push = airship.create_push()
>>> push.audience = ua.or_(ua.alias('adam'), ua.device_token('some_token'))
>>> push.notification = ua.notification(alert='Hello')
>>> push.device_types = ua.all_
>>> push.send()

Broadcast to iOS, Android, and BlackBerry devices

>>> push = airship.create_push()
>>> push.audience = ua.all_
>>> push.notification = ua.notification(
...     ios=ua.ios(alert='Hello iOS'),
...     android=ua.android(alert='Hello Android'),
...     blackberry=ua.blackberry(alert='Hello BlackBerry'))
>>> push.device_types = ua.device_types('ios', 'android', 'blackberry')
>>> push.send()

Sending a rich app page to a single iOS device

>>> import urbanairship
>>> airship = urbanairship.Airship('application_key','master_secret')
>>> push = airship.create_push()
>>> push.audience = ua.device_token('some_token')
>>> push.notification = ua.notification(alert='Hello')
>>> push.device_types = ua.device_types('ios')
>>> push.message = ua.message(
...     "Hello, Rich Push User",
...     "<html><h1>Hello!</h1><p>Goodbye.</p></html>")
>>> push.send()

Questions

The best place to ask questions is our support site: http://support.urbanairship.com/

History

  • 0.1 Initial release
  • 0.2 Added tags, broadcast, feedback
  • 0.3 Added deregister, device token list, other minor improvements
  • 0.4 Added batch push
  • 0.5 Added Android, Blackberry, Rich Push, and scheduled notifications
  • 0.6 Major refactoring, support for push api v3

urbanairship's People

Contributors

brett-s avatar crow avatar mgood avatar mhooge avatar richardkeen avatar robotadam avatar ustun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.