semvec/pypi-packages huggingface dataset:
flask_simplerest 1.0.3
A Flask extension for easy ReSTful API generation
License: BSD

Flask simple REST
=========================

A Flask extansion for simple ReSTful api generation

Install
-------

For install you can use pip:
```
pip install flask_simplerest
```

Usage
-------

app.py
```
from flask import Flask
from flask.ext.simplerest import SimpleRestApp
from handlers.myhandler import MyHandler

app = Flask(__name__)
rest = SimpleRestApp(app)

MyHandler(rest, 'prefix_if_needed')

@rest('/index', 'PUT')
def some_put_method():
    pass

app.run()
```

handlers/myhandler.py
```
from flask.ext.simplerest import SimpleRestResource, rest
from flask.ext.simplerest import fields

class Projects(SimpleRestResource):
    @rest('/', 'POST')
    def test(self, name=fields.String):
        return {'name':name}

    @rest('/<int:my_id>/123', 'POST')
    def test2(self, my_id, name=fields.String(default='Costos')):
        return dict(my_id=my_id, name=name)

```

Bash
(first you must run application)
```
curl http://127.0.0.1:5000/ -d name=Murza
{
    'name': 'Murza'
}
```
django-plainpasswordhasher 0.3
Dummy (plain text) password hashing for Django.
License: BSD

##########################
django-plainpasswordhasher
##########################

Dummy (plain text) password hashing for Django... for use in tests!


***************
Speed up tests!
***************

Cryptography is greedy. When you run tests, you usually do not care about
password security, but you care about performances. Using dummy password
hashing speeds up tests!

Install ``django-plainpasswordhasher`` with your favorite installer.
Here is an example using pip:

.. code:: sh

   pip install django-plainpasswordhasher

Then configure your test settings:

.. code:: python

   PASSWORD_HASHERS = ('django_plainpasswordhasher.PlainPasswordHasher', )


**************************************
Except explicit password hashing tests
**************************************

In most cases, using a dummy password hasher will do the job.
But you may write some tests that require real password hashing. In such a
case, let's override settings!

.. code:: python

   from django.conf import global_settings  # Django default settings...
                                            # You may use your project's
                                            # default settings instead.
   from django.test import TestCase
   from django.test.utils import override_settings

   @override_settings(PASSWORD_HASHERS=global_settings.PASSWORD_HASHERS)
   class CryptographyTestCase(TestCase):
	"""Tests that require real cryptography."""


*********
Resources
*********

* PyPI page: https://pypi.python.org/pypi/django-plainpasswordhasher
* Code repository: https://github.com/novapost/django-plainpasswordhasher
* Bugtracker: https://github.com/novapost/django-plainpasswordhasher/issues
* Continuous integration: https://travis-ci.org/novapost/django-plainpasswordhasher


**********
References
**********

* `Original blog post
  <http://tech.novapost.fr/django-comment-booster-ses-tests-en-1-minute.html>`_

* `Django 1.5 documentation about getting faster tests
  <https://docs.djangoproject.com/en/1.5/topics/testing/#speeding-up-the-tests>`_ 

* `Discussion about password hashers & testing in Django issues
  <https://code.djangoproject.com/ticket/20917>`_