Skip to main content

Python package for using the Urban Airship API

Project description

https://travis-ci.org/urbanairship/python-library.svg?branch=master

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 1.0, Python 2.6, 2.7, 3.3 or 3.4 is required. Newer versions of Python may also work.

Functionality

Version 1.0 is a feature upgrade and backwards incompatible with versions earlier than 0.8. This release focuses on support for In-App messaging along with new iOS 10 extras.

A more detailed list of changes can be found in the CHANGELOG.

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.ios_channel('some_ios_channel'))
>>> push.notification = ua.notification(alert='Hello')
>>> push.device_types = ua.device_types('ios')
>>> 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 as ua
>>> airship = ua.Airship('application_key','master_secret')
>>> push = airship.create_push()
>>> push.audience = ua.ios_channel('some_ios_channel')
>>> 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

  • 1.0 Support for In-App and iOS 10

  • 0.8 Support for Reports APIs.

  • 0.7 Support for Python 3, major refactoring

  • 0.6 Major refactoring, support for push api v3

  • 0.5 Added Android, Blackberry, Rich Push, and scheduled notifications

  • 0.4 Added batch push

  • 0.3 Added deregister, device token list, other minor improvements

  • 0.2 Added tags, broadcast, feedback

  • 0.1 Initial release

Project details


Download files

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

Source Distribution

urbanairship-1.0.0.tar.gz (20.3 kB view details)

Uploaded Source

File details

Details for the file urbanairship-1.0.0.tar.gz.

File metadata

File hashes

Hashes for urbanairship-1.0.0.tar.gz
Algorithm Hash digest
SHA256 10fa06cc4fca878886ffaa179674e07b743496e80e2856a51abeb8fd6121fc1a
MD5 fa791bc6c49d57f3c2b7fa8e115d0eca
BLAKE2b-256 88c0507192e9b8a607eafe34fe64005965e52b2304a7861073868c529765bd8f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page