- You can sign up as a user
- Log in as a user and use the 'log in' response body as a token to get authorized. As an authorized user you can create authors, books, genres, quotes and book reviews. Without logging in you can only read the lists of authors, books, genres, quotes and book reviews that other people left.
3) After registering on our website you get a welcoming email with the pdf file of book recommendations for this month.
Book recommendations are being scraped from the New York Times Bestsellers of this month. Here is the link:
https://www.nytimes.com/books/best-sellers/combined-print-and-e-book-fiction/
This pdf list contains: book name, author name, book description and book cover.
Dramatiq is used here to support the background task.
Scraping is used here to automate the task, reportlab library is used for pdf generation and email.mime with smtplib libraries are used to send the email to the user.
- You can also join our telegram channel. After first talking to the channel it tells you your chatID, after giving us your chatID through '/send_pdf_to_tg' endpoint, it will send you that recommendations pdf in telegram channel also.
Dramatiq is used here to support the background task.
- Start a virtual environment virtualenv venv /venv/scripts/activate
- Install required packages pip install -r requirements.txt
- Start the database docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres alembic revision -m 'initial_migration' --autogenerate alembic upgrade head
- Start redis docker run -d --name redis -p 6379:6379 redis/redis-stack-server:latest
- Start the main app (venv) PS C:\Users\Админ\Desktop\adv backend\fast> uvicorn main:app --reload
- Start in a separate terminal PS C:\Users\Админ\Desktop\adv backend\fast\dramatiq_job> dramatiq main
- Start the test server on a separate port (venv) PS C:\Users\Админ\Desktop\adv backend\fast\test_server> uvicorn main:app --reload --port 9000