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
Cses2humio - CrowdStrike Falcon Event Stream to Humio

CrowdStrike Falcon Event Stream to Humio This project intend to provide a simple

Trifork.Security 6 Aug 02, 2022
You can use the mvc pattern in your flask application using this extension.

You can use the mvc pattern in your flask application using this extension. Installation Run the follow command to install mvc_flask: $ pip install mv

Marcus Pereira 37 Dec 17, 2022
A comprehensive reference for all topics related to building and maintaining microservices

This pandect (πανδέκτης is Ancient Greek for encyclopedia) was created to help you find and understand almost anything related to Microservices that i

Ivan Bilan 64 Dec 09, 2022
Online Boutique is a cloud-native microservices demo application

Online Boutique is a cloud-native microservices demo application. Online Boutique consists of a 10-tier microservices application. The application is

Matt Reider 1 Oct 22, 2021
Microservice example with Python, Faust-Streaming and Kafka (Redpanda)

Microservices Orchestration with Python, Faust-Streaming and Kafka (Redpanda) Example project for PythonBenin meetup. It demonstrates how to use Faust

Lé 3 Jun 13, 2022
Asita is a web application framework for python.

What is Asita ? Asita is a web application framework for python. It is designed to be easy to use and be more easy for javascript users to use python

Mattéo 4 Nov 16, 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
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
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
The lightning-fast ASGI server. ?

The lightning-fast ASGI server. Documentation: https://www.uvicorn.org Community: https://discuss.encode.io/c/uvicorn Requirements: Python 3.6+ (For P

Encode 6k Jan 03, 2023
A microservice written in Python detecting nudity in images/videos

py-nudec py-nudec (python nude detector) is a microservice, which scans all the images and videos from the multipart/form-data request payload and sen

Michael Grigoryan 8 Jul 09, 2022
A very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs.

cx_Oracle_async A very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs. Easy to use , buy may not

36 Dec 21, 2022
Fast⚡, simple and light💡weight ASGI micro🔬 web🌏-framework for Python🐍.

NanoASGI Asynchronous Python Web Framework NanoASGI is a fast ⚡ , simple and light 💡 weight ASGI micro 🔬 web 🌏 -framework for Python 🐍 . It is dis

Kavindu Santhusa 8 Jun 16, 2022
Pretty tornado wrapper for making lightweight REST API services

CleanAPI Pretty tornado wrapper for making lightweight REST API services Installation: pip install cleanapi Example: Project folders structure: . ├──

Vladimir Kirievskiy 26 Sep 11, 2022
FPS, fast pluggable server, is a framework designed to compose and run a web-server based on plugins.

FPS, fast pluggable server, is a framework designed to compose and run a web-server based on plugins. It is based on top of fastAPI, uvicorn, typer, and pluggy.

Adrien Delsalle 1 Nov 16, 2021
Web framework based on type hint。

Hint API 中文 | English 基于 Type hint 的 Web 框架 hintapi 文档 hintapi 实现了 WSGI 接口,并使用 Radix Tree 进行路由查找。是最快的 Python web 框架之一。一切特性都服务于快速开发高性能的 Web 服务。 大量正确的类型

Aber 19 Dec 02, 2022
WebSocket and WAMP in Python for Twisted and asyncio

Autobahn|Python WebSocket & WAMP for Python on Twisted and asyncio. Quick Links: Source Code - Documentation - WebSocket Examples - WAMP Examples Comm

Crossbar.io 2.4k Jan 06, 2023
Full duplex RESTful API for your asyncio web apps

TBone TBone makes it easy to develop full-duplex RESTful APIs on top of your asyncio web application or webservice. It uses a nonblocking asynchronous

TBone Framework 37 Aug 07, 2022
Chisel is a light-weight Python WSGI application framework built for creating well-documented, schema-validated JSON web APIs

chisel Chisel is a light-weight Python WSGI application framework built for creating well-documented, schema-validated JSON web APIs. Here are its fea

Craig Hobbs 2 Dec 02, 2021
web.py is a web framework for python that is as simple as it is powerful.

web.py is a web framework for Python that is as simple as it is powerful. Visit http://webpy.org/ for more information. The latest stable release 0.62

5.8k Dec 30, 2022