Skip to content

Repository files navigation

CatScan

A modern web application built with FastAPI for efficient data processing and scheduling.

Features

  • Asynchronous SQLite database operations using aiosqlite
  • Scheduled tasks management with APScheduler
  • Beautiful colored logging with colorlog
  • Modern REST API using FastAPI with standard features
  • HTML templating using Jinja2
  • XML processing capabilities with lxml
  • HTTP client functionality with HTTPX

Requirements

  • Python 3.13+
  • uv package manager

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/catscan.git
cd catscan
  1. Install uv package manager and sync
uv sync
  1. Run next script for initializing the test SQLite database
 python -m scripts.init_test_db

Usage

Start the server:

uvicorn main:app --reload

The API documentation will be available at (app can use other port):

Log Outputs

  1. Console Output

    • Colored formatting using colorlog
    • Shows timestamp, logger name, level, and message
    • Format: %(asctime)s - %(name)s - %(levelname)s - %(message)s
  2. File Output

    • Located in output/scheduler.log
    • Rotating file handler to manage log size
    • Detailed formatting without colors
    • Preserves complete logging history

Configured Loggers

  • models.observer: Tracks page changes and updates (INFO level)
  • app.routers.admin_routes: Admin panel operations (DEBUG level)
  • uvicorn: Server logs (INFO level)
  • Root logger: Catches all other logging (INFO level)

About

News scraper

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages