A local web application providing Swagger UI for testing LMS API requests from imported Postman collections, as well as an interactive Bulk Student Upload system for creating students from Excel (.xlsx) and CSV files.
Simply double-click run.bat (or run run.bat in Command Prompt / PowerShell).
It automatically detects Python, launches the application, and opens http://127.0.0.1:8000 in your default browser.
From this directory:
python app.pyOpen http://127.0.0.1:8000.
Switch to the Bulk Student Upload tab in the web interface to upload students in batches:
- Supported Formats: Excel workbooks (
.xlsx) and CSV files (.csv). No third-party packages required (built with pure standard library). - Template Downloads: Download sample templates directly from the UI or via:
GET /api/bulk-upload/template.xlsxGET /api/bulk-upload/template.csv
- Flexible Column Mapping: Automatically recognizes column variations (case-insensitive, spaces/underscores ignored):
firstName(aliases:First Name,fname,first)lastName(aliases:Last Name,lname,last,surname)middleName(aliases:Middle Name,middle)primaryEmail(aliases:Primary Email,Email,emailid)secondaryEmail(aliases:Secondary Email,altemail)contactNo(aliases:Contact No,Phone,Mobile,Phone No)address(aliases:Address,City,Location)batchUniqueId(aliases:Batch Unique ID,Batch ID,Batch Code)studentUniqueId(aliases:Student Unique ID,Student ID,Roll No,Reg No)secondaryLangauge(aliases:Secondary Language,Language)classStartDate(aliases:Class Start Date,Start Date)
- Default / Fallback Inputs: Apply default
batchUniqueId,classStartDate, orsecondaryLangaugeto rows that do not have them. - Pre-upload Validation: Displays an interactive preview table showing mapped columns, row validity, and missing fields.
- Real-Time Live Progress: Watch each student's creation status live (
✓ Successor✗ Failed: reason) with a visual progress bar. - Report Export: Download a full execution report as a
.csvfile upon completion.
Switch to the Reset Password tab in the web interface to reset and change student LMS login passwords:
- Dedicated REST API:
POST /api/student/reset-passwordaccepts:(Also supports multiple emails via{ "email": "student@riceindia.org", "password": "NewPassword@123", "environment": "production" }"emails": ["student1@...", "student2@..."]). - LMS Environment Selector:
production->https://lms.ricesmart.in/change-password-by-emailuat->https://lms-uat.ricesmart.in/change-password-by-emailriceedu->https://lms.riceedu.in/change-password-by-emailriceedu_uat->https://lms-uat.riceedu.in/change-password-by-email
- Credential-Safe Proxy: Automatically applies authorized server credentials (
Authorization: cd4e20a844e7cdfaa9d04d4d0555f7) without exposing them to the client. - Web UI Controls: Live email input, password generator with one-click strong password creation, show/hide toggle, and instant visual status reporting.
The app serves a local Swagger UI backed by /openapi.json and proxies requests through /api/proxy/{id}:
- Rice Smart Production Server:
https://lms.ricesmart.in/api/v1/rice/student(Production) - Rice Smart Testing / UAT Server:
https://lms-uat.ricesmart.in/api/v1/rice/student(UAT) - Rice Edu Production Server:
https://lms.riceedu.in/api/v1/rice/student(Rice Edu) - Rice Edu Testing / UAT Server:
https://lms-uat.riceedu.in/api/v1/rice/student(Rice Edu) - Covers student, batch, batch-group, and defaulter endpoints across Production, UAT, Production/development, and Rice Edu environments.
- Uses each request's Postman authentication header, falling back to
postman/secrets/api_key.txtwhen needed. Credentials are never exposed to the browser. - The Rice Smart student POST is prefilled from
postman/secrets/student_request_example.json.
The repository is configured for Postman with .postman/resources.yaml linked to workspace 409b9255-4de7-47a9-8042-112bd0ef4aab:
-
Option A (Automated Cloud Upload): Upload the collection directly to your Postman Cloud workspace via:
python upload_to_postman.py --key PMAK-YOUR_KEY
(Or run
python upload_to_postman.pyand enter your key when prompted). -
Option B (Postman Local View / VS Code Extension): Open this folder in Postman Desktop or the Postman VS Code extension. The collections in
postman/collections/and spec inpostman/specs/are detected automatically in Local View; click Push / Sync to sync to the remote workspace. -
Option C (1-Click File Import): In Postman, click Import and choose:
postman/Student-Management-API.postman_collection.json(Full collection with Bulk Upload & proxy endpoints)postman/specs/openapi.json(Full OpenAPI 3.0 specification)
To use a different port, set PORT or API_TESTER_PORT before running the server (defaults to port 8000, binding to 0.0.0.0).
This project is configured out-of-the-box for free cloud hosting with zero maintenance:
- Push this repository to your GitHub account (
https://github.com/AryaDXD/rice_api). - Go to Vercel and sign in with GitHub.
- Click Add New... -> Project and select
rice_api. - Leave all settings at their defaults (Vercel automatically detects
vercel.jsonandapi/index.py). - Click Deploy. Your app will be live with a free SSL domain (e.g.
https://rice-api.vercel.app).
- Sign up for a free account at Render.
- Click New + -> Web Service.
- Connect your
rice_apiGitHub repository. - Render automatically picks up
render.yamlandProcfile(python app.py). - Choose the Free instance type and click Create Web Service. Your app is live at
https://rice-api.onrender.com.
- Railway: Connect repo -> Railway detects
Procfileand deploys automatically. - Docker: Build and run anywhere using the included
Dockerfile:docker build -t rice-api . docker run -p 8000:8000 rice-api