PyGyat

Python with rizz. Be a sigma and mog your skibidi toilet opps before they crashout. This language can only be used in Ohio.

PyGyat is a Python preprosessor which translates regular Python code into brainrot by replacing certain keywords, operators, and built in functions with iPad kid vocabulary.

Implementation based on Bython.

Key features

  • Write Python using brainrot terms instead.
  • Run PyGyat files using the `pygyat` command, just like Python.
  • Translate Python files to PyGyat and vice versa.
  • Real Python keywords that have defined PyGyat mappings will not be allowed.
  • Edit your PyGyat code with syntax highlighting with the `vscode-pygyat` extension.

Code example

PyGyat Code Example

Installation

You can install PyGyat directly from PyPI using pip:

$ pip3 install pygyat

If you want to install it from the git repository:

$ git clone https://github.com/shamith09/<span className="font-mono bg-gray-800 rounded px-1">pygyat</span>.git
$ cd <span className="font-mono bg-gray-800 rounded px-1">pygyat</span>
$ pip3 install .

To uninstall:

$ pip3 uninstall pygyat

To install the VS Code extension, visit the Visual Studio Marketplace.

Keyword mappings

Python Keyword/OperatorPyGyat Translation
try/except/finallyhawk/tuah/spit on that thang
returnits giving
-fanum tax
+rizz
printyap
TrueAura
FalseCooked
defbop
whilelet him cook
importglaze
fromlock in
classskibidi
if/elif/elsechat is this real/yo chat/only in ohio
formewing
breakjust put the fries in the bag bro
continueedge
assertsus
raisecrashout
withpookie
asahh
globalGOAT
nonlocalmotion
deldelulu
yieldpause
yield frompause no diddy
NoneNPC
passpluh
selfunc
rangehuzz
>sigma
<beta
sigma twin
beta twin
==twin
openmog
closedemure

Quick intro

PyGyat works by first translating PyGyat files (suggested file ending: .gyat) into Python-files, and then using Python to run them. You therefore need a working installation of Python for PyGyat to work.

To run a PyGyat program:

$ pygyat source.gyat arg1 arg2 ...

PyGyat also includes a translator from Python to PyGyat using the py2gyat command:

$ py2gyat test.py

Structure of the repository

At the moment, PyGyat is written in Python. The git repository is structured into 4 directories:

  • pygyat contains a Python package containing the parser and other utilities used by the main script
  • etc contains manual pages and other auxillary files
  • scripts contains the runnable Python scripts, ie the ones run from the shell
  • testcases contains a couple of sample *.gyat and *.py files intended for testing the implementation
  • vscode-pygyat contains the Visual Studio Code extension that enables syntax highlighting in VS Code.