Skip to main content

An AI-driven domain-specific language engine for automated data cleaning pipelines.

Project description

PuraLang Engine ๐Ÿš€

Founder & Author

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


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:

  1. Send your description to an AI model
  2. Show you the generated .pura script
  3. Execute it automatically
  4. 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 run command
  • AI Mode with ask command
  • 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 .pura syntax 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


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

puralang_engine-1.0.4.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

puralang_engine-1.0.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

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

Hashes for puralang_engine-1.0.4.tar.gz
Algorithm Hash digest
SHA256 2dc15de0b57c435acaf2180928146c4032a7dfd7a5c807be8f486c16dbad8759
MD5 f31d5d40d233cfc91f5d86b9cc074d13
BLAKE2b-256 a44eee74fdc9cdfd89d0a49edf1c02564be9d836cb28593cee7e166a3e273d17

See more details on using hashes here.

File details

Details for the file puralang_engine-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for puralang_engine-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 06b150a9b98ef04002049ffbc601efedc9acd0c8183cd510e9ad98ca897cb76d
MD5 03468f529d7fdece5f99c1396c60b6d2
BLAKE2b-256 9192ec20f273311a25d3b668287e567de6b97a38cd0caf709719a2b8a5d784b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page