A JSON parsing API written in Python using Django MVC architecture based framework.
import/
-POST
endpoint which accepts a JSON formatted request body and parses itdetail/<modelname>/
-GET
a list of entries based on the name of a modeldetail/<modelname>/<id>
-GET
details of the entry given
- Create a virtual environment using
python3 -m venv env
- Run the environment
path\to\env\Scripts\activate.bat
on Windowssource /path/to/env/bin/activate
on Unix/MacOS
- Install the dependencies
pip install -r requirements.txt
- Run this command to get your personal secret key
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
- Copy the key and save it as an environment variable following this guide
- To create the defined database schema, run
python3 manage.py migrate
- Run the application with the following
python3 manage.py runserver
- Import data similar to the
data/test_data.json
, using the/import
endpoint - Retreive the imported model, using
/detail/<modelname>
endpoint - Retreive the model data, using
/detail/<modelname>/<id>
endpoint
Disclaimer: The API works only with models specified below.
- Catalog
- Image
- Attribute
- AttributeName
- AttributeValue
- Product
- ProductImage
- ProductAttributes
Licensed under MIT License