Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/couchbaselabs/beersample-python
Simple webapp with the Python SDK
https://github.com/couchbaselabs/beersample-python
Last synced: 1 day ago
JSON representation
Simple webapp with the Python SDK
- Host: GitHub
- URL: https://github.com/couchbaselabs/beersample-python
- Owner: couchbaselabs
- Created: 2013-06-15T01:43:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-07T22:52:27.000Z (over 9 years ago)
- Last Synced: 2024-04-12T16:19:08.654Z (9 months ago)
- Language: Python
- Size: 173 KB
- Stars: 10
- Watchers: 164
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
=================================
Couchbase Beer Python Application
=================================This is a sample web application written with the Python Couchbase Library.
Currently it relies on the latest patches from gerrit (Specifically,
http://review.couchbase.org/#/c/26856/ and
http://review.couchbase.org/#/c/26934/).To test this application, install `Flask` (``pip install flask``).
The actual Python routing code is found in the ``beer.py`` file.
You will need to have the ``beer-sample`` bucket installed.
Additionally, you will need two additional views:``beer/by_name``::
function(doc, meta) {
if (doc.type && doc.type == "beer") {
emit(doc.name, null);
}
}Here you will need to create a new design document, called
``brewery``.``brewery/by_name``::
function(doc, meta) {
if (doc.type && doc.type == "brewery") {
emit(doc.name, null);
}
}To run the webapp, simply do::
python beer.py
And connect to ``localhost:5000``