GithubHelp home page GithubHelp logo

aroyer / hunch-gift-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hunch/hunch-gift-app

2.0 3.0 0.0 3.79 MB

A example application for finding gifts for friends on Twitter using the Hunch API

Home Page: http://hunch.com/apps/gifts/

License: MIT License

hunch-gift-app's Introduction

Hunch Gift Application

This application will display gift recommendations for any Twitter user and is an example of what can be built using the Hunch API. The code is almost identical to that powering the Hunch Gift-o-Matic. The application is built to run either as a standalone Django application or using Google App Engine.

Other libraries used include:

Getting started

  1. Download the Google App Engine Python SDK

  2. Test your app loads the test page

    • run python dev_server.sh (this defaults to running on port 80 which may require root permissions)
    • open a web browser and navigate to http://localhost
    • ensure that you see the success page
    • now navigate to http://localhost/gifts/
    • ensure that you can enter a twitter name and get recommendations
  3. When ready, deploy the app to GAE

    • in settings.py, create a SECRET_KEY
    • python manage.py deploy

Useful commands

Start the development server sh dev_server.sh

Publish your app to GAE python2.5 manage.py deploy

Launch a local Python console for interecting with the app and datastore python2.5 manage.py shell

Launch a remote Python console for interacting with the app and datastore python2.5 manage.py remote shell

Notes and gotchas

  • GAE will penalize your app if requests take over 1000 ms to complete, so push as many calls to the frontend as possible by using the Hunch Javascript SDK

  • This application is packaged with djangoappengine for creating Django projects that run on GAE. It is worthwhile to read the overview of using the helper.

  • GAE uses Python 2.5, so running scripts like manage.py with python2.5 is recommended. The scripts dev_server.sh and fresh_dev_server.sh use python2.5

  • You can access the GAE admin console at http://localhost/_ah/admin/

  • For testing, it is useful to redirect your-app-name.appspot.com to your local machine. To accomplish this, edit your /etc/hosts file and point that address to your IP (or localhost)

hunch-gift-app's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.