#python #write #json #reason

bin+lib cursython

Let's write Python with JSON. For some reason.

1 unstable release

0.1.0 Jul 27, 2023

#9 in #reason

MIT license

27KB
860 lines

Cursython

cursython (cur-SY-thon) is a very cursed form of writing python. Instead of writing innocently innocent python code, you write JSON.

I want the docs!

here.

Quickstart

  1. make sure you have the rust toolchain installed on your system (cargo, rustc, etc.)
  2. issue cargo install cursython
  3. profit

OR

  1. also make sure you have the rust toolchain installed on your system.
  2. clone the repository
  3. issue make clean userinstall (with GNU make)
  4. profit

Now, please run the examples by compiling it with the cursython command. run cursython --help for usage info.

Backstory

So this youtuber A Byte of Code made this video, showcasing his framework HTML.JS, where you write HTML for logic instead of JavaScript. In the comment section I wrote that I would waste 3 months of my time writing a TOML.py framework where you write python with toml, and this is the result.

It actually only took me 9 days + 5 days of procrastination, I started on the 17th of July (2023) and now it's the 26th.

With this glorious library/framework/transpiler, you can write python code with json, for some reason™.

Why did I use JSON/JSON5 and not TOML?

JSON Fibonacci generator

TOML conversion

You can see for yourself :))

Project for grabs

Try using HTML.js with a cherrypy web server with cursython. This way, you can confidently say that you wrote a web app without any real programming languages ;)

LICENSE

MIT.

Dependencies

~8.5MB
~161K SLoC