AI-powered code generation streamed live to your terminal.
Project description
nirmal ⚡
AI-powered code generation, streamed live to your terminal.
import nirmal
nirmal.make("create a snake game in pygame")
Code starts appearing instantly — character by character — as the AI writes it in real time.
Installation
pip install nirmal
Requires Python 3.8+.
Quick Start
import nirmal
# Generate a complete script from a single sentence
nirmal.make("build a REST API with FastAPI that has CRUD routes for a todo list")
That's it. The generated code streams directly into your terminal.
More Examples
import nirmal
# Games
nirmal.make("create a tetris clone using pygame")
# Web
nirmal.make("build a flask web app with user login and a dashboard")
# Scripts
nirmal.make("write a python script that watches a folder and renames files by date")
# Data
nirmal.make("create a pandas script that reads a CSV, cleans missing values, and plots a bar chart")
# Automation
nirmal.make("write a selenium script that logs into a website and scrapes product prices")
How It Works
Your Python code
│
▼
nirmal.make("your prompt")
│
▼ POST /nirmal/generate.php
PHP Backend (Hostinger)
│
▼ Groq API (llama-3.3-70b-versatile)
Streaming AI response
│
▼
Live terminal output ✓
- You call
nirmal.make()with a plain-English description. - The package sends a POST request to the PHP backend.
- The backend forwards the prompt to Groq with streaming enabled.
- Each token is forwarded back to Python as it arrives.
- Python prints each chunk live — no waiting for the full response.
Configuration
If you host your own backend, edit nirmal/config.py:
BACKEND_URL = "https://your-domain.com/"
REQUEST_TIMEOUT = 60 # seconds
Package Structure
nirmal/
├── nirmal/
│ ├── __init__.py ← public API (make)
│ ├── client.py ← streaming HTTP client
│ ├── config.py ← endpoint + timeout settings
│ └── utils.py ← markdown cleanup helper
├── backend/
│ ├── generate.php ← PHP streaming proxy to Groq
│ └── .htaccess ← security rules for Hostinger
├── pyproject.toml ← pip package config
├── README.md
└── LICENSE
License
MIT — see LICENSE.
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 nirmal-1.0.2.tar.gz.
File metadata
- Download URL: nirmal-1.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22a72c36210e53b4be9883ae03df2fa5994ea642c7a2360d9e2c3ba469d29f31
|
|
| MD5 |
db75cd22a736def09fb937894bd9585b
|
|
| BLAKE2b-256 |
d514058e51edf88b1319cac4ec18d48a584281467b80cbeedbeb4a52a290e203
|
File details
Details for the file nirmal-1.0.2-py3-none-any.whl.
File metadata
- Download URL: nirmal-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08c1f863fa81e73c14af778a79a90cef3b101d36c41871658ca60593fa83cdac
|
|
| MD5 |
2392c42f6283bad23ab8c1f6ff3acf4f
|
|
| BLAKE2b-256 |
c2b64572c7c924e35ce3942df6a41c41881263adc79bd6e7f6b204cc9d136ec8
|