Skip to content

Python script to download, transform and update data on a routine schedule

License

Notifications You must be signed in to change notification settings

sgcarstrends/updater

Repository files navigation

Updater

Description

Scheduler for downloading and updating cars and COE data.

Prerequisites

Installation

pnpm install

Scripts

  • pnpm dev: Start development server using SST (Serverless Stack) in dev stage
  • pnpm test: Run tests using Vitest
  • pnpm test:coverage: Run tests with coverage report
  • pnpm migrate: Run database migrations using Drizzle Kit

Key Dependencies

Development Tools

Key Features

  • Automated job scheduling with Trigger.dev
  • Efficient file download and extraction
  • SHA-256 checksum calculation
  • Serverless database migrations
  • Redis caching support

Database Migrations

Migrations are managed using Drizzle Kit. Run pnpm migrate to apply database schema changes.

Performance Considerations

  • Streaming file processing to minimize memory usage
  • Chunk-based file checksum calculation
  • Lightweight ZIP file handling
  • Serverless job scheduling

License

MIT License

Author

Ru Chern Chong [email protected]