Flask-Twip
A twitter API proxy extension for Flask microframework.
Know bugs
- Only supports Override mode (well, at least for now. Will add Transparent mode if I have the time)
TODO
- Test transparent mode with Hotot
- Convert this README into reStructuredText and display it on PyPI
- Documentation about customized deployment
Features
- Support multiple platforms
- CGI on virtual hosts
- Heroku
- Run as a
WSGI
server
- Support multiple mode
- Override Mode: override OAuth signatures from clients
- Transparent Mode: passing all HTTP paramters onto Twitter (still experimenting)
- Support multiple storage backend
FileBackend
SQLBackend
(usingSQLAlchemy
)
Using Flask-Twip
Configuration file example can be found at here.
Run test server locally
For developers.
pip install -e git+git://github.com/yegle/flask_twip.git#egg=Flask-Twip
- Refer to https://github.com/yegle/flask_twip/tree/master/examples/dev.
Run in CGI mode
CGI is supported on most web hosting servers.
- Create a virtual environment using
virtualenv
- Install
Flask-Twip
usingpip install Flask-Twip
- Refer to https://github.com/yegle/flask_twip/tree/master/examples/cgi.
Run on Heroku
Heroku is a widely used PaaS platform.
- Create a heroku project. Refer to Heroku's docs if you don't know how to.
- Add dev DB server to this project. Run
heroku addons:add heroku-postgresql:dev
in the root directory of your project - Copy files in https://github.com/yegle/flask_twip/tree/master/examples/heroku to your project directory
- Push your project to heroku.
In order for the dev DB server to work, you need an extra step to init the database
- Run
herku run python
- Type the following Python code
from app import be
be.init_db()
You only need to init your database the first time you setup Flask-Twip
Contributors
Tips
Gratuity greatly appreciated but not necessary. https://www.gittip.com/yegle/
Project is a member of the OSS Manifesto