Python based Brainrot language'.
Project description
BrainRot - Custom Python Syntax Extension
BrainRot is a Python-based language extension that allows you to use brainrot instead of def for defining functions. It also enables importing and executing .brainrot files as if they were regular Python modules.
Features
- Define functions using
brainrotinstead ofdef. - Import
.brainrotfiles directly into Python. - Automatically transpiles BrainRot code into valid Python.
- Installable via
pipfrom GitHub.
Installation
To install BrainRot from GitHub, run:
pip install git+https://github.com/Shane-Develops/Brainrot.git
Usage
1. Create a .brainrot File
Create a file called example.brainrot and define a function using brainrot:
brainrot sigma():
rizz("That's a very sigma code!")
sigma()
2. Import and Execute
Save the file in the same directory as your Python script. Then, in a Python script, import the .brainrot file like a normal module:
import brain_rot
import example # Automatically converts and executes example.brainrot
When executed, this will print:
Hello from BrainRot!
How It Works
- The BrainRot import system finds
.brainrotfiles and processes them. - It replaces
brainrotwithdef, making the code valid Python. - The modified code is then compiled and executed seamlessly.
Project Structure
brain_rot/
│── brain_rot/
│ │── __init__.py
│ │── brain_rot_importer.py
│── examples/
│ │── example.brainrot
│── setup.py
│── README.md
│── .gitignore
Contributing
Feel free to contribute by submitting issues or pull requests on GitHub!
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brain_rot-0.1.tar.gz.
File metadata
- Download URL: brain_rot-0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d2356b32e63e606bd358eb3b33aff913cf2d2ef05489549ca8059e3185f00e
|
|
| MD5 |
a3bf0479122143270208613f366686cf
|
|
| BLAKE2b-256 |
cc0cca7927446b0c9f0ba37d74508e06cbd14618c9e2f65af3a79d81fa5150d1
|
File details
Details for the file brain_rot-0.1-py3-none-any.whl.
File metadata
- Download URL: brain_rot-0.1-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c786c5d7074b0e7ba33973fc1155b908a8008d4c059206207b6226f15aedac60
|
|
| MD5 |
12df2c4127444670b95eac474da2b3d4
|
|
| BLAKE2b-256 |
c38ebbb8449bbcbab5b87c0878af4c9939d50fd191d2f8dd7684f7a4423cb386
|