Repository files navigation Check-Point Home Assignment - Django REST API
Goto main package -> check_point_dj
run: 'python manage.py runserver'
run Docker server
docker build --tag python-django .
docker run --publish 8000:8000 python-django
To access the API via curl:
run 'python manage.py test' to run all tests
'key_words_api' package holds modules responsible for making Django run.
Most importantly this includes ulrs.py and settings.py that map our URLs and control settings respectively.
'events_app' is our Django app for our events API v1.
urls.py:
maps the internal URLs of the api.
models.py:
This holds our Model "EventItem" that represents a row in an SQLite Database.
views.py:
In Django views are functions/classes that take requests & return responses.
We define here 2 views, one for each of our api endpoints.
Note: Django is structured as MVT(Model View Template).
Unlike MVC the View in Django is more of a Service Layer.
This API has only one table - to hold EventItems
data - in the forma of a string.
stats - Json object, counter of key-word occurences.
a timestamp - datetime.datetime object.
Was not clear exactly what interval was - I assumed that it meant get interval seconds back
I assumed we tally only full words.
I assumed the search is case insensitive.
About
Django REST API
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.