A Python transpiler to write Python code using Bangla keywords.
Project description
CodeBangla
CodeBangla is a Python package that allows you to write Python code using Bangla keywords (in English transliteration). It is designed to help beginners, especially students in Bangladesh, to learn programming concepts without being intimidated by English-based syntax.
This project transpiles .bp (BanglaPython) files into standard .py files, which can then be executed by the Python interpreter.
⚠️ Known Issues
- Numeral Conversion: The automatic conversion of Bengali numerals (e.g.,
১২৩) to English numerals (123) is currently not working due to a deep, unresolved issue in the tokenization process. All other features are functional.
🚀 Features
- Bangla Keywords: Write Python using intuitive Bangla words (
jodi,noile,chhap,shuru, etc.). - Transpiler: Converts your Bangla-Python code into clean, standard Python code.
- CLI Tool: Run your
.bpfiles directly from the command line. - Safe Replacement: Preserves strings, comments, and code structure by using Python's native tokenizer.
📦 Installation
-
Clone the repository:
git clone https://github.com/gemini/codebangla.git cd codebangla
-
Install the package:
pip install -e .
📝 Usage
You can use codebangla in two ways:
1. Run a file directly
Create a file with a .bp extension, for example, hello.bp:
# hello.bp
shuru main():
chhap("Hello from CodeBangla!")
main()
Now, run it from your terminal:
codebangla run hello.bp
2. Compile a file
You can also compile your .bp file into a standard .py file.
codebangla compile hello.bp
This will create a hello.py file in the same directory.
🧪 Running Tests
To run the included tests, first install the developer dependencies:
pip install -r requirements.txt
Then, run pytest:
pytest
🗺️ Keyword Mappings
Here are some of the supported Bangla keywords and their Python equivalents:
| Bangla | Python |
|---|---|
chhap |
print |
neoa |
input |
jodi |
if |
noile |
else |
jotokkhon |
while |
shuru |
def |
phiredao |
return |
sotti |
True |
miththa |
False |
er_jonno |
for |
moddhe |
in |
...and many more!
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 codebangla-0.1.1.tar.gz.
File metadata
- Download URL: codebangla-0.1.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8145102fa711955a8481b461f5162ca2000dc606910b05cdd6be771c89740100
|
|
| MD5 |
457b9e67db2f9f467e709c637d695689
|
|
| BLAKE2b-256 |
a2d2130c8a976d99c5143bd0b1b666646a86823cdda7b0f008a1d99d9ec8ffaf
|
Provenance
The following attestation bundles were made for codebangla-0.1.1.tar.gz:
Publisher:
publish-to-pypi.yml on saky-semicolon/CodeBangla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codebangla-0.1.1.tar.gz -
Subject digest:
8145102fa711955a8481b461f5162ca2000dc606910b05cdd6be771c89740100 - Sigstore transparency entry: 433548358
- Sigstore integration time:
-
Permalink:
saky-semicolon/CodeBangla@f6fe171238b0cb302244d1efcf4bdccbdb4f61e7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/saky-semicolon
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f6fe171238b0cb302244d1efcf4bdccbdb4f61e7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file codebangla-0.1.1-py3-none-any.whl.
File metadata
- Download URL: codebangla-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
201dbb1c1bf5826e8f2e95a087ee44d29c6f842cb7c042136ce94ee534058bb4
|
|
| MD5 |
83703d04d6d664c2b250d016d8f6ba88
|
|
| BLAKE2b-256 |
eeec1b15ad404a1a68c62eff8033657d3983f6665bd91a83b1de18712b0fca79
|
Provenance
The following attestation bundles were made for codebangla-0.1.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on saky-semicolon/CodeBangla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codebangla-0.1.1-py3-none-any.whl -
Subject digest:
201dbb1c1bf5826e8f2e95a087ee44d29c6f842cb7c042136ce94ee534058bb4 - Sigstore transparency entry: 433548377
- Sigstore integration time:
-
Permalink:
saky-semicolon/CodeBangla@f6fe171238b0cb302244d1efcf4bdccbdb4f61e7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/saky-semicolon
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f6fe171238b0cb302244d1efcf4bdccbdb4f61e7 -
Trigger Event:
release
-
Statement type: