Giter VIP home page Giter VIP logo

python_flask_api_with_mongodb's Introduction

This application makes a request to 3rd party API then does sentiment analysis on the responses to classify the result

The python scripts can be ran as standalone scripts or the entire application can be ran using docker.

The following commands can be used to bring up the docker environment

docker-compose build in the root folder for the application followed by docker-compose up

Dependencies

The application requires a VirusTotal API key and an AbuseIPDB API Key. The can be found at VirusTotal and AbuseIPDB

The API keys should be stored in an .env file in the root folder of the project.

Application Endpoints

The application has three endpoints which are:

  • GET localhost:5000/cleardb - this clears all data within the database
  • POST localhost:5000/lookupip - this checks if a previously reported IP is in the database, otherwise it does a lookup to AbuseIPDB then stores important fields from the response
  • POST localhost:5000/lookupdomain - this checks if a previously reported domain is in the database, otherwise it does a lookup to VirusTotal then parses the data for specific fields which it then sends to another 3rd party API for sentiment analysis then stores the result

The request bodies of the POST endpoints require the following payloads for IP lookup and Domain Lookup respectively

Domain lookup {"domain":"A-DOMAIN"} IP lookup {"ip":"A-IPV4 or IPV6 IP}

With Content-Type set to application/json

python_flask_api_with_mongodb's People

Contributors

tikitk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.