Skip to content

David-Roklem/python-project-83

Repository files navigation

Hexlet tests and linter status:

Actions Status lint_check Maintainability

python-project-83 (Page analizer)

This project deployed on Railway.app. Check it out here Page analyzer is a Hexlet study project for students of Python-developer course. User can add a website to the main page and check its basic SEO-optimisation, such as HTTP status code, title and description.

UPD.

Unfortunately, Railway.app cancelled their free subscription so the webpage isn't currently online...

Getting Started

Dependencies

python = ">=3.8.1,<4.0.0"
Flask = "^2.2.3"
gunicorn = "^20.1.0"
python-dotenv = "^1.0.0"
psycopg2-binary = "^2.9.6"
validators = "^0.20.0"
beautifulsoup4 = "^4.12.2"
requests = "^2.30.0"
flake8 = "^6.0.0"

Installing

This project uses poetry as a package manager as well as virtual environment. So clone this project, then install poetry with the command in terminal:

git clone https://github.com/GregTMJ/python-project-83.git
pip install poetry

After that, using short commands from Makefile, run:

make install

The last command will install all the needed dependencies

Executing program

As this project uses https://pypi.org/project/python-dotenv/ library, first of all you need to configure your .env with the following variables:

SECRET_KEY
DATABASE_URL

For SECRET_KEY I recommend using repl type the next commands:

>>> import secrets
>>> secrets.token_hex(16)

This will generate a hexadecimal secret key, safe enough for production use

DATABASE_URL variable is set up by following this scheme: {provider}://{user}:{password}@{host}:{port}/{db}

For example:

DATABASE_URL=postgresql://janedoe:mypassword@localhost:5432/mydb

That's it, you can now use and test the project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published