Giter Site home page Giter Site logo

newsify_back's Introduction

Newsify Backend (Deprecated)

Newsify Backend is an API that scrapes some of the most important news platforms such as The Washington Post, El Pais and El Tiempo to get the most recent news.

Try the API it on Newsify Back

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

  • Clone the project:

    git clone https://github.com/jazzify/newsify_back.git
    
  • Install Python/Pip:

    You must have Python 3 and pip3 installed on your machine in order to run the project.

  • Database:

    Newsify is using PostgreSQL on a Docker container with docker-compose

  • Virtual environment (Optional):

    I like to use Conda as a VE manager but you can also use virtualenv or virtualenvwrapper

Installing

A step by step series of examples that tell you how to get a development env running.

Go to the project directory

cd path/to/newsify_back/

Install the dependencies:

pip install -r requirements.txt

Install the development dependencies (optional):

pip install -r requirements-dev.txt

If you already have docker and docker-compose in your machine, just run the following command to get your database up and running:

docker-compose up -d

Apply the basic migrations:

python manage.py makemigrations
python manage.py migrate

Check everything works by starting the server:

python manage.py runserver

Running the tests

TODO

Deployment

TODO

Built With

Docs at:

https://newsify-back.readthedocs.io/en/latest/index.html

https://newsify-back.herokuapp.com/api-docs/

Authors

License

This project is licensed under the BSD 3-Clause License - see the LICENSE.md file for details

newsify_back's People

Contributors

jazzify avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

newsify_back's Issues

Better error handling

It would be great to add a feature when the crawl fails, to notify any developer, this app is based on the HTML stability structure of the news platforms, if this change Newsify won't be able to retrieve any post, we need a way to identify this errors to make the respective hotfix.

Possible solutions when the crawler fails:

  • Email the backend developers
  • Implement a push notification service

Change DB

We can check relational DBs:

  • MySQL
  • PostgreSQL

Maybe NoSQL:

  • MongoDB

Plus check:

  • GrahpQL

Create categories for each type

Add categories for every post_type in order to retrieve the last 10 posts for each news platform.

  • GET: /api/twp/posts/ (last 10)
  • GET: /api/etp/posts/ (last 10)
  • GET: /api/eps/posts/ (last 10)
  • etc...

Enhance API docs

API docs are autogenerated by DRF we must generate it ourselves to keep the data structure mirroring the actual API response.

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.