शिल्प (Shilp) - Sahaj Hindi Lipi Prakalp...
हिन्दी में लिखी जाने वाली, पायथन पर आधारित प्रोग्रामिंग भाषा। A Hindi programming language whose semantics are identical to Python — keywords, builtins, variables, and error messages, all in Hindi (Devanagari).
कार्य अभिवादन(नाम):
अगर नाम == "":
वापस "नमस्ते, दुनिया!"
वापस f"नमस्ते, {नाम}!"
हर व्यक्ति में ["अर्जुन", "प्रिया", "कबीर"]:
छापो(अभिवादन(व्यक्ति))
$ shilp namaste.shilp
नमस्ते, अर्जुन!
नमस्ते, प्रिया!
नमस्ते, कबीर!
त्रुटियाँ भी हिन्दी में / Errors are in Hindi too:
अनुरेखण (सबसे हालिया कॉल अंतिम):
फ़ाइल "khel.shilp", पंक्ति 8, <मुख्य स्तर> में
छापो(भाग(१०, ०))
फ़ाइल "khel.shilp", पंक्ति 5, कार्य 'भाग' में
वापस अ / ब
शून्य से भाग त्रुटि (ZeroDivisionError): शून्य से भाग संभव नहीं
स्थापना / Install
pip install shilp # from a local wheel: pip install dist/shilp-*.whl
Requires Python ≥ 3.12. A standalone Linux binary (no Python needed) is in dist/bin/.
प्रयोग / Usage
| आदेश | काम |
|---|---|
shilp |
अन्तरक्रियात्मक सत्र (REPL) |
shilp खेल.shilp [तर्क...] |
कार्यक्रम चलाएँ |
shilp chalao खेल.shilp |
कार्यक्रम चलाएँ (run) |
shilp anuvad खेल.shilp [-o out.py] |
उत्पन्न पायथन कोड देखें — "मुझे पायथन दिखाओ" |
shilp anuvad --ulta खेल.py [-o out.shilp] |
पायथन कोड को शिल्प में बदलें — "मुझे शिल्प दिखाओ" |
shilp jaanch खेल.shilp |
केवल वाक्यविन्यास जाँचें |
shilp --madad |
सहायता |
यह कैसे काम करता है / How it works
Shilp is a thin, token-level translation layer over CPython (see PLAN.md):
- Devanagari numerals (
१२.५) are converted to ASCII outside string literals. - The source is tokenized by Python's own tokenizer; Hindi keywords arrive as
NAMEtokens and are remapped (अगर→if) with line numbers preserved exactly. - CPython compiles and runs the result — so every Python feature works:
classes, generators, decorators,
असिंक/प्रतीक्षा(async/await), मिलान/मामला (match/case), f-strings… - Hindi builtins (
छापो,लंबाई,श्रेणी, …) are injected as aliases of the real builtins; a custom excepthook renders tracebacks in Hindi with the original Hindi source lines.
Because the mapping is one-to-one and reversible, Shilp is tested differentially against CPython: reference Python programs are machine-converted to Shilp, both are executed, and outputs must match.
- Python modules and pip packages import as-is:
आयात math,से random आयात randint. - Multi-file programs work:
आयात मेरा_मॉड्यूलfindsमेरा_मॉड्यूल.shilp. - Methods/attributes (
.append,.split) remain English in v1 — see SPEC.md. - Word tables are data (shilp/shabdkosh/) — future language packs (मराठी, தமிழ், বাংলা…) need no engine changes.
भाषा एक नज़र में / Language at a glance
| पायथन | शिल्प | पायथन | शिल्प |
|---|---|---|---|
if / elif / else |
अगर / अन्यथा_अगर / अन्यथा |
def / return |
कार्य / वापस |
for / in / while |
हर / में / जब_तक |
class |
वर्ग |
try / except / finally |
कोशिश / पकड़ो / अंत_में |
import / from / as |
आयात / से / जैसा |
True / False / None |
सत्य / असत्य / रिक्त |
and / or / not |
और / या / नहीं |
break / continue / pass |
तोड़ो / जारी / छोड़ो |
raise / assert / del |
उठाओ / दावा / हटाओ |
Full tables: SPEC.md. Examples: examples/.
विकास / Development
python3 -m unittest discover -s tests # परीक्षण चलाएँ
python3 -m shilp examples/namaste.shilp # बिना install किए चलाएँ
VS Code syntax highlighting + phonetic snippets (agar → अगर): editors/vscode/.
Pygments: pygmentize -l shilp works once shilp and pygments are installed.
License
GPL Ver 3.0
Metadata
Release files for shilp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shilp-0.1.0.tar.gz | 39.9 kB | Without provenance | Details for shilp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shilp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for shilp-0.1.0-py3-none-any.whl |
Total release size: 77.4 kB
Release files / shilp-0.1.0.tar.gz
| Download URL | shilp-0.1.0.tar.gz |
|---|---|
| Size | 39.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63dba61264ae4e45282d174a1ec5c32f49de515922c1e270bdef9972fe955082
|
|
BLAKE2b-256 checksum How to use checksums |
b4a3c358ed1a2d1d08e72e18faa0acac52427147711d1f95a8aa15908c1404da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / shilp-0.1.0-py3-none-any.whl
| Download URL | shilp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 37.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4730f0e4577e4647073721e26c149beaf9e1f30dd6525826403d483931009583
|
|
BLAKE2b-256 checksum How to use checksums |
72f24e316a6836f36a8ec96b4b1d9ed095eb89067304bd79a7620e9d417af90c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for shilp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.