Skip to content

SruthiSathya/bart-data-platform

Repository files navigation

BART Data Platform

A Python-based platform for managing and uploading BART station data. This monorepo includes a gRPC backend service, a CLI uploader, and shared protobuf definitions. Built for speed, reliability, and modularity.


Features

  • gRPC backend for high-throughput, real-time data ingestion.
  • CLI tool for uploading CSV files to the service.
  • Shared protobuf definitions for consistent data structures.
  • Modular and maintainable project structure using Poetry.

Prerequisites

  • Python 3.14+
  • Poetry
  • gRPC server running locally (localhost:50051)
  • Optional: Docker if using docker-compose.yml for local services

Installation

  1. Clone the repository
git clone <your-repo-url>
cd bart-data-platform
  1. Install dependencies using Poetry
poetry install
  1. Generate gRPC Python files (if .proto changes):
python3 -m grpc_tools.protoc \
  -I=proto \
  --python_out=shared/shared \
  --grpc_python_out=shared/shared \
  proto/bart_station.proto

  1. Install the shared package in your environment:
poetry add ./shared

Usage

Start the gRPC server

poetry run python -m bartdataservice.bartdataservice.grpc_server
  • Runs the gRPC service on localhost:50051.

  • Handles station creation requests from the CLI.

Upload CSV via CLI

poetry run bartdatauploader ../data/station-names.csv
  • CLI prints upload results per row:
Uploaded Embarcadero: success=True, message='Created'
Uploaded Montgomery: success=True, message='Created'
  • Positional argument: FILE_PATH – path to the CSV file.

  • No subcommands required — simply pass the CSV as the first argument.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages