News search API developed for the purposes of the ColdCase Project.

Overview

Saxion - Cold Case - News Search API

Setup


Local – Linux/MacOS

  1. Make sure you have python 3.9 and pip 21 installed.
  2. This project uses a MySQL database, if you want to connect to a local MySQL database, make sure you have MySQL server installed https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/
  3. A SQL script is provided in the repository with the database articles used for testing.
  4. Clone the Git repository to your local system.
  5. Make sure you have virtualenv installed:
sudo pip3 install virtualenv
  1. Create a virtual environment with the name of the project:
virtualenv coldcaseenv
  1. Activate the virtual environment:
source coldcaseenv/bin/activate
  1. Go inside the project folder, and copy the .env.example file, and make the name of the new file “.env”: cp .env.example .env
  2. Fill this file with your own environment variables. The variables that need to be filled are already there.
  3. Install the required packages:
pip install -r requirements.txt
  1. Now, migrate the database tables into the database with the following command:
python manage.py migrate
  1. It is time to start the server, which you can do with the following command:
python manage.py runserver

Local- Windows

The setup for Windows is very similar to the one on Linux. These are the differences: Installing Python and pip:

  1. As a windows user, you can get Python, including pip, from here: https://www.python.org/downloads/
  2. Next, to install a virtual environment tool:
pip3 install virtualenvwrapper-win 
  1. Then, to start the virual environment, this is the command:
mkvirtualenv coldcaseenv
  1. The environment is activated automatically, so, now we can go on with step 8 (Linux/MacOS Setup (above))

AWS

To install this project on an AWS server, the steps are very similar to the ones for the local machine. This is what needs to be done.

  1. First, create an amazon EC2 instance, with SSH access to yourself, and http inbound requests for everyone.
  2. SSH into this instance, with the keys you got during the setup of this instance.
  3. Install the necessary packages:
sudo apt-get install python3-pip apache2 libapache2-mod-wsgi-py3
  1. This project uses a MySQL database, if you want to connect to a local MySQL database, make sure you have MySQL server installed ( https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/ )
  2. A SQL script is provided in the repository with the database articles used for testing.
  3. Clone the Git repository to your local system.
  4. Make sure you have virtualenv installed:
  1. Create a virtual environment with the name of the project:
virtualenv coldcaseenv
  1. Activate the virtual environment:
source coldcaseenv/bin/activate
  1. Go inside the project folder, and copy the .env.example file, and make the name of the new file “.env”:
cp .env.example .env
  1. Fill this file with your own environment variables. The variables that need to be filled are already there.
  2. Install the required packages:
pip install -r requirements.txt
  1. Now, migrate the database tables into the database with the following command:
python manage.py migrate
  1. Get out of the local instance with the following command: deactivate
  2. Go to the root directory of the EC2 instance with: cd
  3. Go to the directory where the Apache configuration file is located, and edit it:
sudo vi /etc/apache2/sites-available/000-default.conf
  1. Replace the file with the following config:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /home/ubuntu/django/coldcasefind/ColdCaseFind
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /home/ubuntu/django/coldcasefind/ColdCaseFind/ColdCaseFind>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess ColdCaseFind python-path=/home/ubuntu/django/coldcasefind/ColdCaseFind python-home=/home/ubuntu/django/coldcasefindenv
WSGIProcessGroup ColdCaseFind
WSGIScriptAlias / /home/ubuntu/django/coldcasefind/ColdCaseFind/ColdCaseFind/wsgi.py
</VirtualHost>
  1. Edit this config in order to make the routes correct for your configuration.
  2. Restart Apache with:
sudo service apache2 restart

This deployment guide is inspired by: https://medium.com/saarthi-ai/ec2apachedjango-838e3f6014ab

Credits

Version: 0.0.3
Date: 29.06.2021
Project: Hot and Cold Case Project
Аssignor: Saxion University of Applied Sciences (Advanced Forensic Technology) | Jaap Knotter
Project Manager: Tatjana Kuznecova
Software Consultant: Dimitar Rangelov | SDP
Software Developer: Luuk Cloosterman


SDP
Saxion

Owner
Dimitar Rangelov
Electrical and Electronics student
Dimitar Rangelov
The comprehensive WSGI web application library.

Werkzeug werkzeug German noun: "tool". Etymology: werk ("work"), zeug ("stuff") Werkzeug is a comprehensive WSGI web application library. It began as

The Pallets Projects 6.2k Jan 01, 2023
The source code to the Midnight project

MidnightSniper Started: 24/08/2021 Ended: 24/10/2021 What? This is the source code to a project developed to snipe minecraft names Why release? The ad

Kami 2 Dec 03, 2021
A proof-of-concept CherryPy inspired Python micro framework

Varmkorv Varmkorv is a CherryPy inspired micro framework using Werkzeug. This is just a proof of concept. You are free to use it if you like, or find

Magnus Karlsson 1 Nov 22, 2021
Bablyon 🐍 A small ASGI web framework

A small ASGI web framework that you can make asynchronous web applications using uvicorn with using few lines of code

xArty 8 Dec 07, 2021
Ape is a framework for Web3 Python applications and smart contracts, with advanced functionality for testing, deployment, and on-chain interactions.

Ape Framework Ape is a framework for Web3 Python applications and smart contracts, with advanced functionality for testing, deployment, and on-chain i

ApeWorX Ltd. 552 Dec 30, 2022
Django Ninja - Fast Django REST Framework

Django Ninja is a web framework for building APIs with Django and Python 3.6+ type hints.

Vitaliy Kucheryaviy 3.8k Jan 02, 2023
A simple todo app using flask and sqlachemy

TODO app This is a simple TODO app made using Flask. Packages used: DoodleCSS Special thanks to Chris McCormick (@mccrmx) :) Flask Flask-SQLAlchemy Fl

Lenin 1 Dec 26, 2021
Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

Tornado Web Server Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking ne

20.9k Jan 01, 2023
The little ASGI framework that shines. ?

✨ The little ASGI framework that shines. ✨ Documentation: https://www.starlette.io/ Community: https://discuss.encode.io/c/starlette Starlette Starlet

Encode 7.7k Jan 01, 2023
Otter is framework for creating microservices in Flask like fassion using RPC communication via message queue.

Otter Framework for microservices. Overview Otter is framework for creating microservices in Flask like fassion using RPC communication via message qu

Volodymyr Biloshytskyi 4 Mar 23, 2022
Web-frameworks-benchmark

Web-frameworks-benchmark

Nickolay Samedov 4 May 13, 2021
The web framework for inventors

Emmett is a full-stack Python web framework designed with simplicity in mind. The aim of Emmett is to be clearly understandable, easy to be learned an

Emmett 796 Dec 26, 2022
The no-nonsense, minimalist REST and app backend framework for Python developers, with a focus on reliability, correctness, and performance at scale.

The Falcon Web Framework Falcon is a reliable, high-performance Python web framework for building large-scale app backends and microservices. It encou

Falconry 9k Jan 01, 2023
Fully featured framework for fast, easy and documented API development with Flask

Flask RestPlus IMPORTANT NOTICE: This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlu

Axel H. 2.7k Jan 04, 2023
Try to create a python mircoservice framework.

Micro current_status: prototype. ... Python microservice framework. More in Document. You should clone this project and run inv docs. Install Not now.

修昊 1 Dec 07, 2021
Dazzler is a Python async UI/Web framework built with aiohttp and react.

Dazzler is a Python async UI/Web framework built with aiohttp and react. Create dazzling fast pages with a layout of Python components and bindings to update from the backend.

Philippe Duval 17 Oct 18, 2022
REST API framework designed for human beings

Eve Eve is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully f

eve 6.6k Jan 07, 2023
A Python package to easily create APIs in Python.

API_Easy An Python Package for easily create APIs in Python pip install easy-api-builder Requiremnets: = python 3.6 Required modules -- Flask Docume

Envyre-Coding 2 Jan 04, 2022
Serverless Python

Zappa - Serverless Python About Installation and Configuration Running the Initial Setup / Settings Basic Usage Initial Deployments Updates Rollback S

Rich Jones 11.9k Jan 01, 2023
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Flask-Potion Description Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resource

DTU Biosustain 491 Dec 08, 2022