Skip to main content

Instant code generation & execution from prompts.

Project description


title: Ranno emoji: 🦖 colorFrom: gray colorTo: yellow sdk: docker pinned: false app_port: 7860 short_description: Python Library

🦖
Ranno

Ranno is a lightweight Python Library that converts prompts into fully-functional Python scripts, scans dataset columns automatically, and runs code safely with automated rollback file protection.

🔗 PyPI Package  |  🆔 pip install ranno or uv add ranno


🐍 SDK

Installation

pip install ranno
# or
uv add ranno

Generate Code (No Execution)

from ranno import gn

# Without Data
print(gn("Create a list of 10 dinosaurs"))

# With Data
print(gn("Find the average price", data="data.csv"))

Execute Code Instantly (Auto-Backup)

from ranno import ex

# Without Data
ex("Print hello world 5 times")

# With Data
ex("Plot price vs category", data="data.csv")

Save Code to File (Write to Disk)

from ranno import gn, sv

# Generate code
code = gn("Download image from URL")

# Save it to a file
sv(code, name="file.py")

Custom Configuration (API & Model)

from ranno import cf, gn, ex

# Set custom credentials & model (Gemini only)
my_cfg = cf(api_key="api_key", model="model_name")

# Run with custom config
print(gn("Plot Sine Wave", config=my_cfg))

# Execute with custom config
ex("Plot correlation", data="data.csv", config=my_cfg)

Features

FEATURE DESCRIPTION
🧠 AI Code Generation Turns plain English prompts into full, runnable Python scripts
📁 AI File Intelligence Detects file types (CSV, Excel, JSON) accurately, even without extensions
🔍 Auto Schema Extraction Reads columns and first 5 rows to build perfect AI context automatically
🧪 Instant Execution Runs AI-generated Python code directly with automated error handling
⚙️ Custom Configuration Override default API keys and Models per request using cf()
🛡️ Shadow Copy Integrity Creates a hidden copy. snapshot before execution; restores on failure
🦖 Ultra Minimalism Four functions (gn, ex, sv, cf) is all you need - zero boilerplate

🏗️ System Architecture

# COMPONENT DESCRIPTION STACK
1️⃣ Ranno SDK The client-side library handling data prep & execution Python, Magika, Pandas
2️⃣ Ranno API Serverless backend for secure code generation FastAPI, Vercel, Gemini

Made with 🦖 by Saptarshi Roy

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

ranno-0.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

ranno-0.4.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file ranno-0.4.0.tar.gz.

File metadata

  • Download URL: ranno-0.4.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for ranno-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9c81a7811469f71982c84b2c54990c7ab3f5f37b41301599efef0664f8e94cdf
MD5 ca39a3094217248e1138a82f002d5a14
BLAKE2b-256 a1119e2776f06ae41c51f7d763ca76b46705e0935e34d7b386fa55da0eb3eb24

See more details on using hashes here.

File details

Details for the file ranno-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ranno-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for ranno-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bed0b024248fad6d490e4b516bdc2a3def8ff7f718ffa88d23b79efd39bad1c
MD5 0e07ec7c2a4769639916279a44a6cb70
BLAKE2b-256 eea3bb1550b560078212152e2245f230db41537efe17957648a7201ee5636c24

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