{"id":18004128,"url":"https://github.com/niklas2902/py4godot","last_synced_at":"2026-04-02T22:09:34.108Z","repository":{"id":37576861,"uuid":"366836572","full_name":"niklas2902/py4godot","owner":"niklas2902","description":"Python scripting for Godot. This GDExtension plugin allows you to use Python like GDScript, accessing the Godot engine's features and benefiting from Python's vast ecosystem.","archived":false,"fork":false,"pushed_at":"2026-01-18T12:44:48.000Z","size":290667,"stargazers_count":265,"open_issues_count":14,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-18T19:33:16.829Z","etag":null,"topics":["cython","gdextension","godot","godotengine","python"],"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/niklas2902.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-12T19:50:09.000Z","updated_at":"2026-01-17T20:18:24.000Z","dependencies_parsed_at":"2024-04-24T14:28:43.387Z","dependency_job_id":"601885a5-44b8-4341-ac87-bfd1127708ab","html_url":"https://github.com/niklas2902/py4godot","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/niklas2902/py4godot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklas2902%2Fpy4godot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklas2902%2Fpy4godot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklas2902%2Fpy4godot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklas2902%2Fpy4godot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklas2902","download_url":"https://codeload.github.com/niklas2902/py4godot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklas2902%2Fpy4godot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28732216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cython","gdextension","godot","godotengine","python"],"created_at":"2024-10-30T00:13:27.261Z","updated_at":"2026-04-02T22:09:34.094Z","avatar_url":"https://github.com/niklas2902.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# py4godot\n\n## Other Projects\n\nThere are a few other cool projects bringing Python to Godot. Check them out!\n\n- [godot-python-extension](https://github.com/maiself/godot-python-extension)  \n- [godot-python](https://github.com/touilleMan/godot-python)\n\n## Description\n*Python scripting for Godot*. This GDExtension plugin allows you to use Python like GDScript, accessing the Godot engine's features and benefiting from Python's vast ecosystem.\n\nInspiration for this project was taken from: https://github.com/touilleMan/godot-python.\n\nThis project is currently in an early phase of development. Consider this more as a demo and don't use this for bigger projects. At the moment only Windows 64 bit and Linux 64 bit are supported.\n\nExamples for this plugin can be found here: [Examples](https://github.com/niklas2902/py4godot-examples)\n\nIf you want a small introduction into py4godot, check out the developer guide: [Developer Guide](https://github.com/niklas2902/py4godot/wiki/Developer-Guide)\n\n\n## Supported Platforms\n- [ ] Windows 32 bit\n- [x] Windows 64 bit\n- [ ] Linux 32 bit\n- [x] Linux 64 bit\n- [x] macOS\n- [ ] Android\n- [ ] iOS\n\n## Install\nDownload the .zip from Releases, extract it and copy the folder into the addons folder on the root of your project.\n## Prerequisites\nYou need a Python 3 version of at least 3.11 with pip installed.\n\n## How to build\n\n### Windows\n#### Setting up a virtual environment (optional)\nAs this project depends on some modules which are downloaded by pip, if you don't want to mess with your packages, you should set up a virtual enviroment.\nThe following code should be executed after cloning the repo\n```console\n$ python -m venv virtual_python #creating the folder with the virtual environemnt\n$ .\\virtual_python\\Scripts\\activate #starting the virtual enviromnent \n$ pip install -r requirements.txt #load dependencies from the textfile requirements.txt\n\n```\n### Generating files\nWe want to generate the files we will later use for the cython compilation like this:\n```console\n$ python generate.py\n```\n\nNow we use Cython to generate the C++ files for our Python classes. \n```console\n$ python cythonize_files.py\n```\n\nif you want faster building, you can build a minimized version. This doesn't include all the classes, but should be enoug for most development and simple projects. For this just call `generate.py`and `cythonize_files.py` with the following options:\n```console\n$ python generate.py -dev_build=True\n$ python cythonize_files.py -mode=\"dev\"\n```\n\n#### Compile project\nNow, we just need to compile the project. The result of the compilation can be found on build/py4godot\n```console\n$ python build.py --target_platform=windows64 --compiler=msvc \n```\n\n### Linux\nBuilding for linux was tested on Ubuntu 20.04.4 LTS\n#### Setting up a virtual environment (optional)\nThe following code should be executed after cloning the repo\n```console\n$ python3 -m venv venv  # creating the folder with the virtual environment\n$ source venv/bin/activate  # starting the virtual environment\n$ pip install -r requirements.txt  # load dependencies from the text file requirements.txt\n```\nIf you are on Python 3.12, you unfortunately have to use this workaround:\n```console\n$ pip install setuptools #Weirdly cython on linux depends on distutils. But python3.12 doesn't provide this anymore. So we have to use this workaround\n$ python copy_distutils.py\n```\n### Generating files\nWe want to generate the files we will later use for the cython compilation like this:\n```console\n$ python generate.py\n```\n\nNow we use Cython to generate the C++ files for our Python classes. \n```console\n$ python cythonize_files.py\n```\nif you want faster building, you can build a minimized version. This doesn't include all the classes, but should be enoug for most development and simple projects. For this just call `generate.py`and `cythonize_files.py` with the following options:\n```console\n$ python generate.py -dev_build=True\n$ python cythonize_files.py -mode=\"dev\"\n```\n\n#### Compile project\nNow, we just need to compile the project. The result of the compilation can be found on build/py4godot\n```console\n$ python build.py --target_platform=linux64 --compiler=gcc \n```\n## Example Code\nHere you can see a basic example of how this project can be used. \nPlease note, that the classname you define under `@gdclass` must match the filename\n```python \n# file: node3d.py\nfrom py4godot.methods import private\nfrom py4godot.signals import signal, SignalArg\nfrom py4godot.classes import gdclass\nfrom py4godot.classes.core import Vector3\nfrom py4godot.classes.Node3D import Node3D\n\n@gdclass\nclass node3d(Node3D):\n\n\t# define properties like this\n\ttest_int: int = 5\n\ttest_float: float = 5.2\n\ttest_bool: bool = True\n\ttest_vector: Vector3 = Vector3.new3(1,2,3)\n\n\t# define signals like this\n\ttest_signal = signal([SignalArg(\"test_arg\", int)])\n\n\n\tdef _ready(self) -\u003e None:\n\t\tpass\n\t\t# put initialization code here\n\n\tdef _process(self, delta:float) -\u003e None:\n\t\tpass\n\t\t# put dynamic code here\n\n\t# Hide the method in the godot editor\n\t@private\n\tdef test_method(self):\n\t\tpass\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklas2902%2Fpy4godot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklas2902%2Fpy4godot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklas2902%2Fpy4godot/lists"}