npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tpython

v1.0.0

Published

WASM compatible AOT-Compiled Python (forked from Panjea)

Readme

tpythonpp

A tiny GIL-less python implementation (based on TinyPy), written in Pythonic++ (a dialect of C++). TPython++ is used by Panjea.com to translate Pythonic++ to WASM. http://www.panjea.com

Benchmarks

alt text

alt text

Ahead of Time Compiled Python

alt text

AOTPY

Ahead of time compiled Python must follow strict rules inorder to be conformant for automatic translation to C++. These rules include:

  • each dictionary can only contain a single key type, either: a single char (in single quotes), or a string (in double quotes), or a number. A dictionary will become std::unordered_map<T,tp_obj>.
  • lists are faster when they only contain a single type, a list of strings will become std::vector<std::string>
  • sets can only contain numbers or strings.
  • functions and methods must be defined in their dependency order, if function B requires function A, then A must be defined first.
  • when the translator fails to determine the type of a variable for automatic unwrapping, you must use the @unwrap(foo=TYPE) decorator to define the variable type.
  • when interfacing with C++, and automatic templates fail to compile, you can type your variables using the @typedef(foo=TYPE) decorator.
  • classes are automatically exposed to non-AOT code, to call a method on an AOT class, you must define that method before the __init__ constructor.
  • AOT class instances are not garbage collected, you must manually delete them when no longer used.
  • a single letter in single quotes is a char type, double quoted strings are const char*
  • white space matters, use tabs for normal indentation, and when the parser fails, adding a space in and around function calls can fix the problem
  • lines that end with ; are considered to be raw C++, and the parser will perform less translation magic on them.
  • by default all members of a class are of the type tp_obj, which is a union of the interpreter types, if you need to store a pointer to an external C++ object, you must cast it to (void*) when you assign it to the member.
  • a wrapped pointer to an external C++ object can be unwrapped using the unwrap(T,ob) macro.
  • functions that do not define a return type, will have tp_obj as their return type, by default returning None

aotpy.py

Front end build script aotpy.py will try to ahead of time compile your python script, otherwise it will fallback to compiling just bytecode.

example:

cd tpythonpp
./aotpy.py benchmarks/recursive_fib.py 

History

TinyPy is the smallest Python implementation ever, just 64K, created by Phil Hassey in 2008. TPython++ is based on RainWoodMans fork of TinyPy. https://github.com/rainwoodman/tinypy The AOT translator is based on a higher level form of Pythonic++ syntax. The TPython interpreter itself is written in low level Pythonic++

New Articles

https://medium.com/@judge_raptor/2x-faster-than-python-7c15ab0a9286

https://medium.com/@judge_raptor/77x-faster-than-rustpython-f8331c46aea1

https://medium.com/@judge_raptor/aotpy-52x-faster-than-python-2bda98ab5e57

https://medium.com/@judge_raptor/escaping-the-interpreter-5675dfda15d3

https://dev.to/djraptor11/blender-destructive-physics-19o4

https://dev.to/djraptor11/zero-hardcoded-values-2c9j