Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bx2/queuer
A simple Flask-based app for queued registration.
https://github.com/bx2/queuer
Last synced: 13 days ago
JSON representation
A simple Flask-based app for queued registration.
- Host: GitHub
- URL: https://github.com/bx2/queuer
- Owner: bx2
- License: wtfpl
- Created: 2014-06-28T23:15:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-29T00:01:08.000Z (over 10 years ago)
- Last Synced: 2024-08-01T22:56:36.694Z (3 months ago)
- Language: Python
- Homepage:
- Size: 156 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Queuer
======A very simple, flask-based app to handle queued registration.
Install the app:
----------------```
# Install requirements
$ pip install -r requirements.txt# Create an empty database
$ python db.py# Run the service
$ python app.py
```Give it a try:
--------------```
>> import requests, json
>> requests.get('http://localhost:5000/registrations').json()
[]
>> requests.post('http://localhost:5000/registrations',
headers={'Content-Type': 'application/json'},
data=json.dumps({'email': '[email protected]'}).json()
{
"created_on": "2014-06-28T23:01:24.312810",
"email": "[email protected]",
"invited": false,
"position": 1,
"waiting_before": 0
}
>> requests.get('http://localhost:5000/registrations/[email protected]').json()
{
"created_on": "2014-06-28T23:01:24.312810",
"email": "[email protected]",
"invited": false,
"position": 1,
"waiting_before": 0
}
```Don't forget that you must past a `Content-Type: application/json` header along
w/ your request!Credits:
--------Big thanks to Max Mautner (https://github.com/mmautner) for publishing his `simple_api` project
which made it much easier for me to write Queuer.