2025-04-01 23:02:19 +02:00
2025-03-30 18:44:30 +02:00
2025-03-30 18:44:30 +02:00
2025-03-30 18:44:30 +02:00
2025-03-30 18:44:30 +02:00
2025-04-02 21:59:50 +02:00
2025-04-01 19:29:42 +02:00
2025-03-30 18:44:30 +02:00
2025-03-30 18:44:30 +02:00
2025-03-30 18:44:30 +02:00

SciPaperLoader: Flask Application Initial Structure

Project Overview

SciPaperLoader is a Flask-based web application for managing scientific papers. It provides a web interface (with Jinja2 templates) enhanced by Alpine.js for interactive UI components and HTMX for partial page updates without full reloads. The application is composed of two main parts: a Flask web app (serving pages for uploading data, configuring schedules, and viewing logs) and a background scraper daemon that runs independently to perform long-running tasks (like fetching paper details on a schedule). The project is organized following Flask best practices (using blueprints, separating static files and templates) and is set up for easy development and testing (with configuration files and a pytest test fixture).

Quick Start

Run the application:

make run

And open it in the browser at http://localhost:5000/

Prerequisites

Python >=3.8

Development environment

  • make venv: creates a virtualenv with dependencies and this application installed in development mode

  • make run: runs a development server in debug mode (changes in source code are reloaded automatically)

  • make format: reformats code

  • make lint: runs flake8

  • make mypy: runs type checks by mypy

  • make test: runs tests (see also: Testing Flask Applications)

  • make dist: creates a wheel distribution (will run tests first)

  • make clean: removes virtualenv and build artifacts

  • add application dependencies in pyproject.toml under project.dependencies; add development dependencies under project.optional-dependencies.*; run make clean && make venv to reinstall the environment

Configuration

Default configuration is loaded from scipaperloader.defaults and can be overriden by environment variables with a FLASK_ prefix. See Configuring from Environment Variables.

Consider using dotenv.

Deployment

See Deploying to Production.

You may use the distribution (make dist) to publish it to a package index, deliver to your server, or copy in your Dockerfile, and insall it with pip.

You must set a SECRET_KEY in production to a secret and stable value.

Description
No description provided
Readme CC-BY-SA-4.0 285 KiB
Languages
Python 49.9%
Jinja 46.1%
Makefile 3.9%