groovy
A small Python library created to help developers protect their applications from Server Side Request Forgery (SSRF) attacks.
Decision gist · record as of 2026-08-14
Yes, if you are building Gradio applications or need to run simple Python functions client-side in JavaScript. The low install friction, no dependencies, and clear error reporting make it straightforward to evaluate whether your code is transpilable. However, the aging maintenance status (532 days since release, last commit 2026-01-19) means you should verify that it still works with your target Python version and that any bugs you encounter will be addressed. Not suitable for complex Python code or projects requiring active maintenance.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >3.9.
- Functions must include type hints on parameters; ambiguous types without hints will raise TranspilationError.
- Low install friction with no runtime dependencies.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for most commercial and open-source projects.
last release 2025-02-28 (532 days) · last repo commit 2026-01-19 · 104 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,567,233 downloads/mo, #2,070 on PyPI
Alternatives
Verify before relying
pip install groovy
from groovy import transpile
def sum_range(n: int):
total = 0
for i in range(n):
total = total + i
return total
js_code = transpile(sum_range)
print(js_code)- Whether transpiled JavaScript output is semantically identical to Python for all supported operations beyond simple arithmetic and control flow.
- Performance characteristics of transpiled JavaScript compared to native Python or hand-written JavaScript.
- Scope and completeness of Gradio-specific class support beyond the gr.Component example shown.
What it is and what it does
Groovy is a Python-to-JavaScript transpiler designed to convert Python functions into equivalent JavaScript code that runs client-side. It was built for use in Gradio, enabling developers to write Python functions that execute in the browser as fast JavaScript without rewriting in a different language. The transpiler takes a conservative approach: it supports a subset of Python syntax (basic arithmetic, control flow, list comprehensions, and some standard library functions) and requires type hints on function parameters to avoid ambiguity. When it encounters unsupported syntax or cannot resolve types, it raises a TranspilationError with line numbers and the problematic code, making it straightforward to identify what needs to be rewritten.
The package has no runtime dependencies and installs cleanly. It prioritizes clear error messages over attempting to transpile everything, so you'll know immediately if a function can't be converted rather than getting silent failures or incorrect JavaScript. The transpiled output is not optimized or minimized, but it aims to produce JavaScript that returns identical values to the original Python when given the same inputs, even if the internal implementation differs slightly (for example, Python tuples become JavaScript arrays).
Use it for
- Convert Python utility functions to run in Gradio web interfaces without duplicating logic in JavaScript.
- Transpile simple Python data-processing functions for client-side execution in web applications.
- Quickly identify which Python functions can be safely moved to the browser by attempting transpilation and reading error messages.
- Prototype client-side computation workflows where Python developers want to avoid learning JavaScript syntax.
- Build web applications where Python business logic needs to execute in the browser for performance or offline capability.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building Gradio applications or need to run simple Python functions client-side in JavaScript.
The low install friction, no dependencies, and clear error reporting make it straightforward to evaluate whether your code is transpilable. However, the aging maintenance status (532 days since release, last commit 2026-01-19) means you should verify that it still works with your target Python version and that any bugs you encounter will be addressed. Not suitable for complex Python code or projects requiring active maintenance.
Install
groovy on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last commit was 2026-01-19 and the package is 532 days past its initial release—so expect slower response to issues or updates.
Requires Python >3.9. Functions must include type hints on parameters; ambiguous types without hints will raise TranspilationError.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for most commercial and open-source projects.
Quickstart
pip install groovy
from groovy import transpile
def sum_range(n: int):
total = 0
for i in range(n):
total = total + i
return total
js_code = transpile(sum_range)
print(js_code)
Verify before relying
- Whether transpiled JavaScript output is semantically identical to Python for all supported operations beyond simple arithmetic and control flow.
- Performance characteristics of transpiled JavaScript compared to native Python or hand-written JavaScript.
- Scope and completeness of Gradio-specific class support beyond the gr.Component example shown.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 532 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,567,233 / month, #2,070 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: groovy-0.1.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python to javascript transpiler”
- groovyTranspiles Python functions to JavaScript, converting Python code to…
- CoffeeScriptCompiles CoffeeScript code to JavaScript from within Python, wrapping…
- pscriptPScript compiles a Python subset to JavaScript, enabling you to write…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pscript · Js2Py · gradio · Js2Py-3.13 · telepath · CoffeeScript · tree-sitter-groovy · gradio-client · dukpy · streamlit-javascript