shell
pip install eve
python
from eve import Eve
from flask import Flask
app = Flask(__name__)
api = Eve(app)
# ...
if __name__ == '__main__':
app.run()
python
people = {
'name': {
'type': 'string',
'required': True,
'unique': True,
},
'age': {
'type': 'integer',
'required': True,
},
}
api.config['DOMAIN'] = {
'people': {
'schema': people
}
}
shell
python app.py