An AI-driven domain-specific language engine for automated data cleaning pipelines.
Project description
PuraLang Engine ๐
Founder & Author
- Sai Darsini Sathuluru - GitHub Profile
An AI-powered Domain-Specific Language for automated data cleaning pipelines.
Describe your data problem in plain English โ PuraLang writes and runs the pipeline for you.
๐ Project Ecosystem
- ๐ฆ Python Package Index (PyPI): puralang-engine
- ๐ป Web Interface Dashboard: Live link
- ๐ Source Code Repository: GitHub Repository
What is PuraLang?
PuraLang is a custom programming language built specifically for data cleaning. Instead of writing 30โ50 lines of Python/Pandas code every time you need to clean a dataset, you write a clean, human-readable .pura script โ or better yet, just describe what you want in English and let the AI generate the script for you.
The Problem It Solves
Every data engineer and ML practitioner spends hours writing repetitive boilerplate code like this:
import pandas as pd
df = pd.read_csv("users.csv")
df = df.drop_duplicates(subset=["user_id"])
df["age"] = df["age"].fillna(24)
df["email"] = df["email"].str.strip().str.lower()
df.to_csv("clean_users.csv", index=False)
With PuraLang, the same result is achieved in 5 readable lines:
LOAD "users.csv"
|> DROP_DUPLICATES "user_id"
|> FILL_NULLS "age" VALUE 24
|> FORMAT_STRINGS "email" TO LOWERCASE
|> EXPORT_CSV "clean_users.csv"
And with AI Mode, you don't even need to write that:
puralang ask "clean users.csv โ remove duplicate user IDs, fill missing ages with 24, lowercase all emails"
Features
- Custom DSL Syntax โ Clean, readable pipeline syntax with
|>operators - AI Mode โ Describe your cleaning task in plain English; the engine generates and runs the script automatically
- Visual Execution Trace โ Beautiful terminal output showing row counts before and after every operation
- Multiple Operations โ DROP_DUPLICATES, FILL_NULLS, FORMAT_STRINGS, FILTER_ROWS, EXPORT_CSV
- Zero Boilerplate โ No Pandas knowledge required to use it
Installation
pip install puralang-engine
Or clone and run locally:
git clone https://github.com/SaiDarsini/puralang_engine.git
cd puralang_engine
pip install -r requirements.txt
Quick Start
Manual Mode โ Write a .pura script
Create a file called pipeline.pura:
LOAD "dirty_data.csv"
|> DROP_DUPLICATES "user_id"
|> FILL_NULLS "age" VALUE 24
|> FORMAT_STRINGS "email" TO LOWERCASE
|> EXPORT_CSV "cleaned_output.csv"
Run it:
puralang run pipeline.pura
AI Mode โ Describe it in English
puralang ask "load sales.csv, remove duplicate order IDs, fill missing prices with 0, export to clean_sales.csv"
PuraLang will:
- Send your description to an AI model
- Show you the generated
.purascript - Execute it automatically
- Print the trace report
Execution Output
Every pipeline run produces a visual trace table in your terminal:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ PuraLang Execution Trace โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Operation โ Rows Before โ Rows After โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโค
โ LOAD SOURCE DATA โ - โ 4 โ
โ DROP DUPLICATES [user_id] โ 4 โ 3 โ
โ FILL NULL FIELDS [age] โ 3 โ 3 โ
โ STRING TRANSFORM [email] โ 3 โ 3 โ
โ EXPORT COMPILED FILE โ 3 โ 3 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโ
Supported Operations
| Operation | Syntax | Description |
|---|---|---|
| Load CSV | LOAD "file.csv" |
Load a CSV file into the pipeline |
| Drop Duplicates | DROP_DUPLICATES "column" |
Remove duplicate rows based on a column |
| Fill Nulls | FILL_NULLS "column" VALUE 0 |
Fill missing values with a default |
| Format Strings | FORMAT_STRINGS "column" TO LOWERCASE |
Normalize text casing |
| Filter Rows | FILTER_ROWS "column" GREATER_THAN 18 |
Filter rows by condition |
| Export CSV | EXPORT_CSV "output.csv" |
Save cleaned data to a new file |
Project Architecture
puralang_engine/
โ
โโโ puralang/
โ โโโ __init__.py # Package version
โ โโโ core.py # Lark grammar, parser, and transformer engine
โ โโโ cli.py # Typer CLI โ run and ask commands
โ
โโโ tests/
โ โโโ sample.pura # Example PuraLang script
โ
โโโ setup.py # PyPI packaging config
โโโ README.md
The engine works in 3 stages:
.pura script โ [Lark Parser] โ Abstract Syntax Tree โ [Transformer] โ Pandas execution โ Clean CSV
For AI Mode:
English prompt โ [LLM API] โ .pura script โ [Engine] โ Clean CSV
Tech Stack
- Lark โ Grammar definition and parsing
- Pandas โ Underlying data manipulation engine
- Rich โ Beautiful terminal output and trace tables
- Typer โ CLI command interface
- Google Gemini API โ AI script generation (AI Mode)
Roadmap
- Core DSL parser and transformer
- CLI with
runcommand - AI Mode with
askcommand - Visual execution trace table
- Live Web UI (Streamlit)
- PyPI public release (
pip install puralang-engine) - Support for JSON and Excel input formats
- VS Code extension with
.purasyntax highlighting
Project Founder: Sai Darsini Sathuluru
About the Author
Sai Darsini Sathuluru
B.Tech Student | Mohan Babu University | Generative AI Intern @ Prodigy InfoTech
Founder & Core Architect of PuraLang Engine
- GitHub: @SaiDarsini
- LinkedIn: Connect here
License
This project is licensed under the MIT License โ you are free to use, modify, and distribute it.
See the LICENSE file for details.
Built with โค๏ธ by Sai Darsini ยท If this helped you, please โญ the repo!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file puralang_engine-1.0.4.tar.gz.
File metadata
- Download URL: puralang_engine-1.0.4.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dc15de0b57c435acaf2180928146c4032a7dfd7a5c807be8f486c16dbad8759
|
|
| MD5 |
f31d5d40d233cfc91f5d86b9cc074d13
|
|
| BLAKE2b-256 |
a44eee74fdc9cdfd89d0a49edf1c02564be9d836cb28593cee7e166a3e273d17
|
File details
Details for the file puralang_engine-1.0.4-py3-none-any.whl.
File metadata
- Download URL: puralang_engine-1.0.4-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06b150a9b98ef04002049ffbc601efedc9acd0c8183cd510e9ad98ca897cb76d
|
|
| MD5 |
03468f529d7fdece5f99c1396c60b6d2
|
|
| BLAKE2b-256 |
9192ec20f273311a25d3b668287e567de6b97a38cd0caf709719a2b8a5d784b7
|