This project is AWS serverless compatible Django application. The application stores and processes GeoJson data.
- Django
- Django REST Framework
- MongoDB
- Mysql
- Pymodm
- Pymodm_rest (https://github.com/lokoArt/pymodm_rest)
- Zappa for serverless deploying
- CoreAPI
Change/select mysql/mongodb in mozo/settings.py
pip instal -r requirements
./manage.py runserver
Update zappa_setting.json setting correct credentials and AWS S3 bucket
zappa deploy dev
./manage.py collectstatic
Documentation is available on {host}:{port}/docs .
However, schemas of endpoints which depend on Mongodb are not displayed properly due to unfinished Pymodm_rest package.
Documentation can be viewed here, also can play with API by this link.
https://b09zlcti7k.execute-api.ap-southeast-1.amazonaws.com/dev/docs/
There are some slight "bugs/features" related to documentation, they should be fixed implementing more sophisticated Schema Generator. In the ideal worlds schema should always be generated automatically. Shouldn't be complicated.
As MongoDB schema generation is in process this payload might help
{
"name": "Test provider",
"price": 999,
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Polygon",
"coordinates": [
[
[
40.515,
60.125
],
[
40.515,
55.631
],
[
65.0390625,
55.631
],
[
65.0390625,
60.125
],
[
40.515,
60.125
]
]
]
}
]
}
}