Skip to main content

pushscreen.io Python client

This is a Python library that makes it even easier to talk the pushscreen.io web service in order to connect to the PushScreen iPad app.

Installation

The code has been tested with Python 2.6 and 2.7.

Please use pip to install on your machine:

pip install pushscreen

Getting Started

First, open the iPad app and create a channel.

Then, in your Python code connect to that channel:

from pushscreen import Channel
channel = Channel("my-channel-name")

And with one more line you can send e.g. a URL to your device:

channel.push(type="url", url="http://code.pb.io/pushscreen/demo1.html")

Different types of pushs

You can push all types of content using the channel.push() method. Just set the type argument to either url, html or clear, and supply other parameters as keyword arguments.

channel.push(type="url", url="http://code.pb.io/pushscreen/demo1.html")
channel.push(type="html", html="<h1>Hello world</h1>")
channel.push(type="clear")

Or use one of the following convenience methods:

url

channel.url("http://code.pb.io/pushscreen/demo1.html")

html

channel.html("<h1>Hello world!</h1>")

clear

channel.clear()

Customization

For the url and html push types you may supply one or more of the following customization options:

interactive

By default the user will not be able to interact with the content on the iPad. To enable touch interaction (links, buttons, etc.), set this to True.

  • Type: bool

  • Default: False

  • Example: channel.url("http://my-url.com/", interactive=True)

scrollable

If you want to make your content scrollable by the user, set this to True. Only useful if you also set interactive=True.

  • Type: bool

  • Default: False

  • Example: channel.url("http://my-url.com/", interactive=True, scrollable=True)

bounces

Set this to True if you want rubber-band scrolling on your content. Only make sense in combination with scrollable=True.

  • Type: bool

  • Default: False

  • Example: channel.url("http://my-url.com/", interactive=True, scrollable=True, bounces=True)

zoomable

If you want the user to be able to use the pinch gestures to zoom the content, set this to True.

  • Type: bool

  • Default: False

  • Example: channel.url("http://my-url.com/", zoomable=True)

javascript

Execute some arbitrary JavaScript code in the context of the web page after it’s loaded.

  • Type: str

  • Default: ""

  • Example: channel.url("http://my-url.com/", javascript="alert('Hello world!');")

ttl

By default the pushed content will stay on screen until the user dismisses it or the next push arrives. If you want your content to disappear after a specific time, set the ttl parameter to the desired time in seconds.

  • Type: float

  • Default: -1 (do not disappear)

  • Example: channel.url("http://my-url.com/", ttl=5.0)

Metadata

Release files for pushscreen 0.3.0

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

Source distribution (sdist)

Source distribution for pushscreen 0.3.0
File Size Uploaded Provenance Actions
pushscreen-0.3.0.tar.gz 5.1 kB Without provenance Details for pushscreen-0.3.0.tar.gz

Release files / pushscreen-0.3.0.tar.gz

Download URL pushscreen-0.3.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
45c0fa667051cbb06ffa70dfd8346a26c48a616afb79a68c927c8689d9ae72ec
BLAKE2b-256 checksum
How to use checksums
a75cdfe2fb72a486696890c6570d6f18db63a4af66566bf8ad2dbcf9a84d31f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pushscreen 0.3.0

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