News-Cast is a simple flask application for adding/deleting/listing/getting news articles from a remote sqlite DB using sqlalchemy.
Run docker run -d -p 8080:8080 adamlavie/news-cast:latest
- Create a virtualenv
- Run
git clone https://github.com/adamlavie/News-Cast.git
- install the news-cast package by running
pip install /path/to/news-cast
- Run
python /path/to/news-cast/rest_service/resources.py
curl -X "GET" http://localhost:8080/articles
curl -X "GET" http://localhost:8080/article/<article_title>
curl -X "PUT" -d title='some_title' -d content='some content' http://localhost:8080/article/some_title
curl -X "DELETE" http://localhost:8080/article/<article_title>
curl -X "POST" -d title='new_title' -d content='new content' http://localhost:8080/article/<article_title>
- Install the test-requirements by running
pip install -r test-requirements.txt
inside your virtualenv. - Run
nosetests tests/test_article_api.py