Skip to main content

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 brainrot instead of def.
  • Import .brainrot files directly into Python.
  • Automatically transpiles BrainRot code into valid Python.
  • Installable via pip from 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 .brainrot files and processes them.
  • It replaces brainrot with def, 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

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brain_rot-0.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brain_rot-0.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

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

Hashes for brain_rot-0.1.tar.gz
Algorithm Hash digest
SHA256 71d2356b32e63e606bd358eb3b33aff913cf2d2ef05489549ca8059e3185f00e
MD5 a3bf0479122143270208613f366686cf
BLAKE2b-256 cc0cca7927446b0c9f0ba37d74508e06cbd14618c9e2f65af3a79d81fa5150d1

See more details on using hashes here.

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

Hashes for brain_rot-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c786c5d7074b0e7ba33973fc1155b908a8008d4c059206207b6226f15aedac60
MD5 12df2c4127444670b95eac474da2b3d4
BLAKE2b-256 c38ebbb8449bbcbab5b87c0878af4c9939d50fd191d2f8dd7684f7a4423cb386

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page