Complete AbuLang integration for Python IDLE - All commands work natively + DataStorage support
Project description
AbuLang - Natural Language Programming
AbuLang is a natural-language programming language that makes coding intuitive and accessible. It translates human-readable syntax into Python, making programming easier for beginners and creative coders.
Features
- Natural Language Syntax: Write code that reads like English
- Python Integration: All AbuLang commands work natively in Python IDLE
- GUI Support: Built-in GUI manager for creating interactive applications
- 3D Graphics: Support for 3D scene creation and manipulation
- File Operations: Easy file reading, writing, and manipulation
- Data Storage: In-memory storage similar to browser localStorage
- Text Processing: Advanced text matching, encoding, and manipulation
- Game Development: Physics engine with gravity simulation
- Web Support: Browser-based IDE with Pyodide integration
Installation
pip install AbuLang
Quick Start
Using AbuLang in Python IDLE
from AbuLangModule import enable_abulang
enable_abulang()
show "Hello, World!"
name = ask "What is your name?"
show "Nice to meet you, " + name
Using the AbuLang Interpreter
Create a file script.abu:
show "Hello, World!"
name = ask "What is your name?"
show "Nice to meet you, " + name
Run it:
python -m AbuLangModule.interpreter script.abu
Core Commands
I/O Commands
show(...)- Display outputask(prompt)- Get user inputmultiple_choice_terminal(prompt, options)- Show multiple choice menu
Data Storage
Create DataStorage as varname- Create isolated in-memory storage- Methods:
setItem(key, value),getItem(key),removeItem(key),clear() - Property:
length
- Methods:
Math Commands
plus(a, b)- Add numbersminus(a, b)- Subtract numbersmulti(a, b)- Multiply numbersdivid(a, b)- Divide numbersexpon(a, b)- Power (a^b)modul(a, b)- Modulo (a%b)absof(x)- Absolute valuesumup(list)- Sum of listavera(list)- Average of list
String Commands
strip(text)- Remove spaceslower(text)- Lowercaseupper(text)- Uppercasereplc(text, old, new)- Replace textfindt(text, word)- Find substringlengt(text)- Lengthisolate(filter, list)- Filter list by string
File Commands
readf(file)- Read filewrite(file, text)- Write fileget_line(n, file)- Get line N from filesave_as(file)- Save format buffer to file
GUI Commands
gui_create(width, height, title)- Create GUI windowobj_create(manager, shape, top_left, bottom_right)- Create objectrgb(r, g, b)- Convert RGB to hex color
Advanced Features
- Text Matching:
match(text, pattern)- Match text case to pattern - Cipher/Decipher:
cipher(text, pattern),decipher(text)- Encode/decode text - Image Processing:
move_to_replicate(gui, image_file, scale, pixel_size)- Convert image to pixel art - Physics:
on_earth(),on_moon(),on_jupiter()- Set gravity types - 3D Graphics:
lib_3d()- Import 3D library
DataStorage Example
from AbuLangModule import enable_abulang
enable_abulang()
# Create a DataStorage instance
Create DataStorage as db
# Store data
db.setItem("username", "Abu")
db.setItem("email", "abu@example.com")
# Retrieve data
show db.getItem("username")
show db.length
GUI Example
from AbuLangModule import enable_abulang
enable_abulang()
libra("abui")
# Create a GUI window
gui = gui_create(800, 600, "My App")
# Create objects
rect = obj_create(gui, "rect", (10, 10), (100, 100))
rect.set_color(rgb(255, 0, 0), "black")
# Run the GUI
gui.run()
Documentation
For more detailed documentation, see:
Requirements
- Python 3.8+
- PyYAML >= 5.4
Optional Dependencies
For full features:
pip install AbuLang[full]
For chess AI:
pip install AbuLang[chess]
License
MIT License
Author
Abu
Support
For issues, questions, or suggestions, please visit the project repository.
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 abulang-4.12.0.tar.gz.
File metadata
- Download URL: abulang-4.12.0.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2042e093dfe1889793258ce508df0c1590b8d99ffc103943444433fdd1e0d065
|
|
| MD5 |
9f0f6afb1e8e777bc38b1470dd68ba74
|
|
| BLAKE2b-256 |
8257659a9081d7da8f8aebe8256b095d36ab994db613b69b53b9965eb5b4fc28
|
File details
Details for the file abulang-4.12.0-py3-none-any.whl.
File metadata
- Download URL: abulang-4.12.0-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
269a77c0cd1b97a7a5385b3c475ef160facf3185caebb8657077ff79e2be0f7a
|
|
| MD5 |
179d6d1087997128583c9597fcf0ee11
|
|
| BLAKE2b-256 |
7fe64555a4dc5873b164e0b7556a44b834c9c8007f166dd12b4356484137f819
|