{"id":13501209,"url":"https://github.com/mathialo/bython","last_synced_at":"2025-05-15T02:06:57.023Z","repository":{"id":37850008,"uuid":"55591710","full_name":"mathialo/bython","owner":"mathialo","description":"Python with braces. Because python is awesome, but whitespace is awful.","archived":false,"fork":false,"pushed_at":"2020-11-26T05:23:59.000Z","size":131,"stargazers_count":2388,"open_issues_count":38,"forks_count":97,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-14T09:54:41.105Z","etag":null,"topics":["braces","bython","indentation","python","whitespace"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathialo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-06T09:09:11.000Z","updated_at":"2025-05-13T22:29:05.000Z","dependencies_parsed_at":"2022-08-08T22:01:51.074Z","dependency_job_id":null,"html_url":"https://github.com/mathialo/bython","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathialo%2Fbython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathialo%2Fbython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathialo%2Fbython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathialo%2Fbython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathialo","download_url":"https://codeload.github.com/mathialo/bython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259383,"owners_count":22040820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["braces","bython","indentation","python","whitespace"],"created_at":"2024-07-31T22:01:29.260Z","updated_at":"2025-05-15T02:06:57.002Z","avatar_url":"https://github.com/mathialo.png","language":"Python","readme":"# Bython\nPython with braces. Because Python is awesome, but whitespace is awful.\n\nBython is a Python preprosessor which translates curly brackets into indentation.\n\n\n## Content of README:\n  * [Key features](#key-features)\n  * [Code example](#code-example)\n  * [Installation](#installation)\n  * [Quick intro](#quick-intro)\n  * [Structure of the repository](#structure-of-the-repository)\n\n\n## Key features\n\n * \"Forget\" about indentaition. You should still write beautiful code, but if you mess up with tabs/spaces, or copy one piece of code to another that uses a different indentation style, it won't break.\n\n * Uses Python for interpretation, that means that all of your existing modules, like NumPy and Matplotlib still works.\n\n\n## Code example\n\n```python\ndef print_message(num_of_times) {\n    for i in range(num_of_times) {\n        print(\"Bython is awesome!\");\n    }\n}\n\nif __name__ == \"__main__\" {\n    print_message(10);\n}\n```\n\n\n## Installation\n\nYou can install Bython directly from PyPI using pip (with or without `sudo -H`, depending on your Python installation):\n\n```\n$ sudo -H pip3 install bython\n```\n\nIf you for some reason want to install it from the git repository you can use `git clone` and do a local install instead:\n\n```\n$ git clone https://github.com/mathialo/bython.git\n$ cd bython\n$ sudo -H pip3 install .\n```\n\nThe git version is sometimes a tiny bit ahead of the PyPI version, but not significantly.\n\nTo uninstall, simply run \n\n```\n$ sudo pip3 uninstall bython\n```\n\nwhich will undo all the changes.\n\n\n\n## Quick intro\n\nBython works by first translating Bython-files (suggested file ending: .by) into Python-files, and then using Python to run them. You therefore need a working installation of Python for Bython to work.\n\n\nTo run a Bython program, simply type\n\n```\n$ bython source.by arg1 arg2 ...\n```\n\nto run `source.by` with arg1, arg2, ... as command line arguments. If you want more details on how to run Bython files (flags, etc), type\n\n```\n$ bython -h\n```\n\nto print the built-in help page. You can also consult the man page by typing\n\n```\n$ man bython\n```\n\nBython also includes a translator from Python to Bython. This is found via the `py2by` command:\n\n```\n$ py2by test.py\n```\n\nThis will create a Bython file called `test.by`. A full explanation of `py2by`, is found by typing\n\n```\n$ py2by -h\n```\n\nor by consulting the man page:\n\n```\n$ man py2by\n```\n\nFor a more in-depth intro, consult the [bython introduction](INTRODUCTION.md)\n\n\n## Structure of the repository\n\nAt the moment, Bython is written in Python. The git repository is structured into 4 directories:\n\n * `bython` contains a Python package containing the parser and other utilities used by the main script\n * `etc` contains manual pages and other auxillary files\n * `scripts` contains the runnable Python scripts, ie the ones run from the shell\n * `testcases` contains a couple of sample \\*.by and \\*.py files intended for testing the implementation\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathialo%2Fbython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathialo%2Fbython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathialo%2Fbython/lists"}