⚡ AeCode
The Ultra-Compressed DSL for Web Scraping & UI Generation.
Save up to 95% of LLM Tokens. Reduce latency by 10x.
Why AeCode? • Quick Start • Syntax • Benchmarks • Examples
🤯 The Problem: LLM Token Inflation
Current AI Coding Agents (Claude 3.5, GPT-4o, Gemini Pro) spend 90% of their output tokens writing:
- Hundreds of lines of repetitive
import requests,BeautifulSoupboilerplate. - Tedious HTML boilerplate,
<!DOCTYPE html>, Tailwind classes strings, and nested loop syntax. - Verbose CSS selector traversals and error-handling blocks.
The result? Higher API bills, sluggish response times, context window exhaustion, and higher chances of hallucinated syntax.
💡 The Solution: AeCode
AeCode compresses complex web workflows into high-density mathematical & functional primitives. An AI model writes 10 lines of AeCode; the engine compiles and executes it as 200+ lines of production Python + Tailwind CSS.
🥊 Real Code Comparison
Task: Scrape 20 Products and Render a Live Dashboard
❌ The Python + HTML Traditional Way (285 Tokens)
import csv, requests
from bs4 import BeautifulSoup
resp = requests.get("http://books.toscrape.com")
soup = BeautifulSoup(resp.text, 'html.parser')
books = []
for pod in soup.select(".product_pod"):
t = pod.select_one("h3 > a")["title"]
p = pod.select_one(".price_color").text
books.append({"title": t, "price": p})
html = """<!DOCTYPE html><html><head><script src="https://cdn.tailwindcss.com"></script></head><body class="bg-gray-900 text-white p-8"><div class="grid grid-cols-4 gap-6">"""
for b in books:
html += f"""<div class="bg-gray-800 p-4 rounded-xl border border-gray-700"><h3 class="font-bold">{b['title']}</h3><p class="text-amber-400 font-bold">{b['price']}</p></div>"""
html += "</div></body></html>"
with open("view.html", "w") as f: f.write(html)
import webbrowser; webbrowser.open("view.html")
✅ The AeCode Way (32 Tokens — 89% Ahorro)
DATA = SCRAPE("http://books.toscrape.com", ".product_pod", [title: "h3 > a" @ "title", price: ".price_color" @ "text"])
VIEW = GRID 4 > CARD(title, price) FROM DATA
RENDER VIEW
📊 Benchmarks
| Task | Traditional Python | AeCode | Token Savings |
|---|---|---|---|
| Basic Web Scraping | ~180 tokens | 48 tokens | -73% |
| Multithreaded Parallel FlatMap | ~280 tokens | 60 tokens | -78% |
| Auto-Pagination (Crawl) | ~320 tokens | 52 tokens | -84% |
| Tailwind Landing Page | ~500 tokens | 25 tokens | -95% |
| Live Scrape-to-UI Dashboard | ~600 tokens | 35 tokens | -94% |
⚡ Quick Start
1. Installation
pip install aecode
2. Verify Your System
aecode doctor
3. Run Your First Flow
aecode flow examples/dashboard.ae
Voilà! It automatically scrapes live data, builds an interactive Tailwind CSS UI, and opens it directly in your default browser.
🧭 Three Engines in One DSL
1. 🌐 AeWeb (Scraping & Data Extraction)
doc = GET("http://books.toscrape.com")
items = doc > ".product_pod"
rows = items | λi. {title: (i > "h3 > a") @ "title", price: (i > ".price_color") @ "text"}
rows => "libros.csv"
aecode scrape examples/scraper.ae
2. 🎨 AeUI (Declarative Web Layouts)
PAGE /home
NAV [MiMarca, Links(Productos, Precios, Contacto)]
HERO "Bienvenido al futuro" center
GRID 3 > CARD(title, desc, price)
BTN "Empezar ahora"
FOOTER
aecode build examples/landing.ae --output index.html
3. ⚡ AeFlow (End-to-End Scraping to Web App)
DATA = SCRAPE("http://books.toscrape.com", ".product_pod", [title: "h3 > a" @ "title", price: ".price_color" @ "text"])
VIEW = GRID 4 > CARD(title, price) FROM DATA
RENDER VIEW
aecode flow examples/dashboard.ae
📐 Syntax Reference
| Operator / Primitiva | Descripción | Ejemplo |
|---|---|---|
GET(url) |
Petición HTTP + Parseo HTML | doc = GET("https://...") |
> |
Selector CSS | items = doc > ".product_pod" |
@ |
Extracción de atributo o texto | (el > "a") @ "href" o @ "text" |
| |
Map funcional sobre colecciones | items | λi. { ... } |
|? |
Filtro funcional booleano | items |? λi. num(i @ "text") > 50 |
|* |
FlatMap concurrente multihilo | urls |* λu. (GET(u) > ".pod") |
CRAWL(url, fn, max) |
Auto-paginación secuencial segura | CRAWL(url, λd. d > "li.next > a" @ "href", 5) |
SCRAPE(...) |
Extracción masiva estructurada | SCRAPE(url, selector, [fields]) |
GRID n > CARD(...) |
Cuadrícula responsiva Tailwind | GRID 4 > CARD(title, price) |
RENDER view |
Compilación y apertura web | RENDER VIEW |
🧠 Philosophy: Mathematical Brevity > Verbosity
Programming languages designed in the 1990s were made for human keyboards. In 2026, code is generated by AI agents collaborating with humans.
- Tokens are compute.
- Tokens are latency.
- Tokens are cost.
AeCode treats code like mathematical equations: dense, declarative, composable, and crystal clear.
📈 Star History
🤝 Community & Support
- 🌟 Star the repository on GitHub
- 💬 Discuss on HackerNews and Reddit (r/Python)
📄 License
Distribuido bajo la Licencia MIT. Consulta LICENSE para más detalles.
Metadata
Release files for aecode 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aecode-0.2.0.tar.gz | 25.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aecode-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.2 kB
Release files / aecode-0.2.0.tar.gz
| Download URL | aecode-0.2.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94daa681d1a8176423b61212f5d7814ce5efa6e812c71c500811529dbd854b86
|
|
BLAKE2b-256 checksum How to use checksums |
2002b3859f4584f54ba01f6b3739a938d418d413c66f55f7ccd7ff3d3ec9235a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / aecode-0.2.0-py3-none-any.whl
| Download URL | aecode-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79f6d7e0b5fd36b1997652621a4cad1180b93dedcc244e5e091de082880960cd
|
|
BLAKE2b-256 checksum How to use checksums |
a2819892bac6aee667379d793477ee65e10702128827247dabc8dc5fc09a8f4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for aecode 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.