Skip to content

SanichMyshkin/python-project-83

Repository files navigation

Page Analyzer

Analyze specified pages for SEO suitability

Actions Status Flake8

About

Page Analyzer is a full-featured application based on the Flask framework that analyzes specified pages for SEO suitability.

Here the basic principles of building modern websites on the MVC architecture are used: working with routing, query handlers and templating, interaction with the database.

In this project the Bootstrap 5 framework along with Jinja2 template engine are used. The frontend is rendered on the backend. This means that the page is built by the Jinja2 backend, which returns prepared HTML. And this HTML is rendered by the server.

PostgreSQL is used as the object-relational database system with Psycopg library to work with PostgreSQL directly from Python.

Demo

Features

  • Validate, normalize and add new URL to the database;
  • Check the site for its availability;
  • Query the desired site, collect information about it and add it to the database;
  • Display all added URLs;
  • Display the specific entered URL on a separate page with obtained information;

Installation

Prerequisites

Poetry

The project uses the Poetry dependency manager. To install Poetry use its official instruction.

PostgreSQL

As database the PostgreSQL database system is being used. You need to install it first. You can download the ready-to-use package from official website or use Homebrew:

brew install postgresql

Application

To use the application, you need to clone the repository to your computer. This is done using the git clone command. Clone the project:

git clone git@github.com:SanichMyshkin/python-project-83.git
cd python-project-83

Then you have to install all necessary dependencies:

make install

Create .env file in the root folder and add following variables:

DATABASE_URL = postgresql://{provider}://{user}:{password}@{host}:{port}/{db}
SECRET_KEY = '{your secret key}'

Run commands from database.sql to create the required tables.


Usage

Start the gunicorn Flask server by running:

make start

By default, the server will be available at http://0.0.0.0:8000.

It is also possible to start it local in development mode with debugger active using:

make dev

The dev server will be at http://127.0.0.1:5000.

About

Page Analyzer — application based on the Flask framework that analyzes specified pages for SEO suitability

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published