{"id":19025241,"url":"https://github.com/nightblade9/dragon","last_synced_at":"2025-04-23T12:42:40.817Z","repository":{"id":47780969,"uuid":"116040107","full_name":"nightblade9/dragon","owner":"nightblade9","description":"Dragon is a universal Python translater.","archived":false,"fork":false,"pushed_at":"2021-08-13T05:59:55.000Z","size":165,"stargazers_count":27,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T00:10:33.020Z","etag":null,"topics":["haxe","prototype","python3","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nightblade9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-02T17:28:21.000Z","updated_at":"2024-01-13T23:57:43.000Z","dependencies_parsed_at":"2022-09-23T20:01:40.564Z","dependency_job_id":null,"html_url":"https://github.com/nightblade9/dragon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightblade9%2Fdragon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightblade9%2Fdragon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightblade9%2Fdragon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightblade9%2Fdragon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nightblade9","download_url":"https://codeload.github.com/nightblade9/dragon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250436823,"owners_count":21430564,"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":["haxe","prototype","python3","transpiler"],"created_at":"2024-11-08T20:42:54.885Z","updated_at":"2025-04-23T12:42:40.799Z","avatar_url":"https://github.com/nightblade9.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dragon\n\n[![Build status](https://travis-ci.org/nightblade9/dragon.svg?branch=master)](https://travis-ci.org/nightblade9/dragon/)\n\nDragon transpiles Python 3 code to [Haxe](http://haxe.org), which can then be transpiled and compiled to various platforms and languages (C++, Javascript, Java, C#, Ruby, Python, Lua, etc. for browser/web, desktop, Android, iOS, etc.)\n\n# Usage\n\n- Create some Python code\n- Create a file like `compiler.py`\n- Add the import `from dragon.transpiler.python_to_haxe_transpiler import PythonToHaxeTranspiler`\n- Invoke `PythonToHaxeTranspiler(source_path, files).transpile()` passing in the directory root of the source files (important for package names!) and a list of files to transpile (eg. `os.glob.glob(\"**/*.py\"))`).\n- Check the outputted Haxe code. Invoke the Haxe compiler as usual.\n\nFor constructs that don't exist in Python (eg. `override`, `@:...`), add them to your Python code and prefix them with `@haxe:`.\n\n# Caveats\n\n- When importing Haxe code, use the Haxe-style `from package.subpackage import ClassName`\n- Make sure all Python files have a final empty line\n\n# Limitations\n\nDragon was created in order to be able to write HaxeFlixel games in Python. Python supports complex features (eg. generator functions, decorators) and ships with a vast collection of functionality (eg. `itertools`, `decimal`, etc.); it would be impossible to keep Dragon up to date.\n\nInstead, Dragon supports just enough functionality to build games. If you find your favourite feature or module missing, feel free to open an issue or send us a PR.\n\n# Roadmap\n\nCurrently, Dragon is in a very early stage of development. We're using Lark to generate the parse tree, and then generate the resulting Haxe code. \n\nOur roadmap:\n\n- [X] Transpile the default HaxeFlixel \"hello world\" template (v0.1)\n- [ ] Transpile a more complicated HaxeFlixel template\n- [ ] Transpile an actual HaxeFlixel game\n    \nOnce we achieve these goals, we plan to release the `v1.0.0` version of Dragon.\n\nYou may also be interested in [Mars](https://github.com/nightblade9/mars), our companion project which handles generating, compiling, and running Python-based HaxeFlixel projects (via Dragon).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightblade9%2Fdragon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightblade9%2Fdragon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightblade9%2Fdragon/lists"}