Skip to main content

Транспилятор русского Python: пишите код на русском, получайте стандартный Python!

Project description

Русский Python (ruspy-transpiler)

Транспилятор, позволяющий писать Python-код с русскими ключевыми словами, функциями и идентификаторами.

Установка

  1. Склонируйте репозиторий или скачайте исходный код.
  2. Перейдите в папку проекта и установите пакет локально:
pip install .

или для разработки:

pip install -e .

Структура

  • ruspy/ — основной пакет
    • transpiler.py — логика транспиляции
    • ruspy_dict.py — официальный словарь (ключевые слова, функции, технические термины)
    • ruspy_user_dict.py — пользовательский словарь (ваши идентификаторы и сообщения)
    • cli.py — CLI-интерфейс
  • setup.py — файл для установки
  • test_ruspy.py — пример кода на русском синтаксисе

Использование

Через CLI

ruspy-transpiler test_ruspy.py -o test_ruspy_out.py

или

python -m ruspy.cli test_ruspy.py -o test_ruspy_out.py

Как библиотека

from ruspy.transpiler import transpile_file
transpile_file('test_ruspy.py', 'test_ruspy_out.py')

Расширение словарей

  • Для добавления новых переводов ключевых слов и функций — редактируйте ruspy_dict.py.
  • Для пользовательских идентификаторов и сообщений — используйте ruspy_user_dict.py.

Проверка полноты

Для проверки, все ли термины переведены, используйте скрипт:

python check_ruspy_dict.py

Проект в стадии разработки. Приветствуются идеи и pull request'ы!

Project details


Download files

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

Source Distribution

ruspy_transpiler-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

ruspy_transpiler-0.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file ruspy_transpiler-0.1.0.tar.gz.

File metadata

  • Download URL: ruspy_transpiler-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ruspy_transpiler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4999063c2c3985366d270af376f0fdc9a9e166c80ad211450f6c7a0ff094cd20
MD5 c91b42c3cf0d769c642dc2b698fbd340
BLAKE2b-256 78de7e91107ffdd581bc5fcd2f8b86ba680dbd9b8e4f849fb8a59d1a1231ab7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruspy_transpiler-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on c1cada3301-web/ruspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ruspy_transpiler-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ruspy_transpiler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37cbfce2e2ead91748a0a0a95ccd541290a49ec9a5b6fd55de0145370213cbcc
MD5 a92bec84a59ee78a7333719cacd556de
BLAKE2b-256 2e06ab78fad4b80c57c7ee279301fe0ed2e7d54b7007b6cbaf377a32ca68d642

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruspy_transpiler-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on c1cada3301-web/ruspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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