Skip to content

A Python + Flask version of our miniseries example publication for Little Printer

Notifications You must be signed in to change notification settings

kennysmed/lp-miniseries-example-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Little Printer Miniseries Example (Python)

This is an example publication, written in Python with the Flask framework. The same example can also be seen in:

The working publication (using the Ruby code) can be subscribed to on BERG Cloud Remote.

The publication will deliver a new image to your Little Printer every weekday for 174 days, from the 1658 book 'The History of Four-Footed Beasts and Serpents'.

Configuration

By default the application is run with DEBUG=False. To change this create a file at lp-miniseries-example-python/settings.cfg containing this:

DEBUG = True

Then set the MINISERIES_SETTINGS environment variable to point to this:

$ export MINISERIES_SETTINGS=./settings.cfg

On Windows use this instead:

>set MINISERIES_SETTINGS=.\settings.cfg

Flask can be installed using pip:

$ pip install -r requirements.txt

## Run it

Run the server with:

$ python publication.py

You can then visit these URLs:

  • /edition/?delivery_count=0&local_delivery_time=2013-10-21T19:20:30+01:00
  • /icon.png
  • /meta.json
  • /sample/

Change the value of delivery_count in the call to /edition/ to see other editions.

You can also try these URLs on the live example of the publication at http://lp-miniseries-example-ruby.herokuapp.com/ .


BERG Cloud Developer documentation: http://remote.bergcloud.com/developers/

About

A Python + Flask version of our miniseries example publication for Little Printer

Resources

Stars

Watchers

Forks

Packages

No packages published