<commit_before>Just a demo REST API using Flask, Flask-Restful and SQLAlchemy
===================

1. Install requisite packages:

    pip install -r requirements.txt

2. Create tables:

    ./models.py

3. Run service:

    ./app.py<commit_msg>add example HTTP calls to the README<commit_after>Just a demo REST API using Flask, Flask-Restful and SQLAlchemy
===================

1. Install requisite packages:

    pip install -r requirements.txt

2. Create tables:

    ./models.py

3. Run service:

    ./app.py

4. Give it a try:

    >> import requests, json
    >> requests.get('http://localhost:5000/todos').json()
    []
    >> requests.post('http://localhost:5000/todos',
                     headers={'Content-Type': 'application/json',
                     data=json.dumps({'task': 'go outside!'}).json()
    {u'id': 1, u'task': u'go outside!'}
    >> requests.get('http://localhost:5000/todos/1').json()
    {u'id': 1, u'task': u'go outside!'}
    >> requests.put('http://localhost:5000/todos/1',
                     headers={'Content-Type': 'application/json',
                     data=json.dumps({'task': 'go to the gym'}).json()
    {u'id': 1, u'task': u'go to the gym'}
    >> requests.delete('http://localhost:5000/todos/1')
    >> requests.get('http://localhost:5000/todos').json()
    []

Don't forget that you must past a "Content-Type: application/json" header along
w/ your request!
{'fraction_non_alphanumeric': 0.18576512455516014, 'fraction_numerical': 0.026334519572953737, 'mean_word_length': 2.883977900552486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1709895', 'n_tokens_mistral': 480, 'n_tokens_neox': 438, 'n_words': 114}