{"id":15055155,"url":"https://github.com/florianrhiem/pyglfw","last_synced_at":"2025-05-14T14:08:29.302Z","repository":{"id":11576626,"uuid":"14065452","full_name":"FlorianRhiem/pyGLFW","owner":"FlorianRhiem","description":"Python bindings for GLFW","archived":false,"fork":false,"pushed_at":"2025-04-15T15:38:38.000Z","size":1531,"stargazers_count":247,"open_issues_count":1,"forks_count":37,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-13T20:36:32.815Z","etag":null,"topics":["glfw","opengl","python"],"latest_commit_sha":null,"homepage":null,"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/FlorianRhiem.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2013-11-02T11:53:46.000Z","updated_at":"2025-04-16T06:36:40.000Z","dependencies_parsed_at":"2024-06-18T13:40:51.124Z","dependency_job_id":"7436b835-da2b-40ac-8c33-91b6084165dd","html_url":"https://github.com/FlorianRhiem/pyGLFW","commit_stats":{"total_commits":143,"total_committers":14,"mean_commits":"10.214285714285714","dds":0.1048951048951049,"last_synced_commit":"7a683c3db9bb882c833d13233e22ec65b4edb3c7"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianRhiem%2FpyGLFW","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianRhiem%2FpyGLFW/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianRhiem%2FpyGLFW/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianRhiem%2FpyGLFW/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlorianRhiem","download_url":"https://codeload.github.com/FlorianRhiem/pyGLFW/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254160373,"owners_count":22024568,"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":["glfw","opengl","python"],"created_at":"2024-09-24T21:39:29.663Z","updated_at":"2025-05-14T14:08:29.283Z","avatar_url":"https://github.com/FlorianRhiem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyGLFW\n======\n\nThis module provides Python bindings for `GLFW \u003chttp://www.glfw.org/\u003e`__\n(on GitHub: `glfw/glfw \u003chttp://github.com/glfw/glfw\u003e`__). It is a\n``ctypes`` wrapper which keeps very close to the original GLFW API,\nexcept for:\n\n-  function names use the pythonic ``words_with_underscores`` notation\n   instead of ``camelCase``\n-  ``GLFW_`` and ``glfw`` prefixes have been removed, as their function\n   is replaced by the module namespace\n   (you can use ``from glfw.GLFW import *`` if you prefer the naming\n   convention used by the GLFW C API)\n-  structs have been replaced with Python sequences and namedtuples\n-  functions like ``glfwGetMonitors`` return a list instead of a pointer\n   and an object count\n-  Gamma ramps use floats between 0.0 and 1.0 instead of unsigned shorts\n   (use ``glfw.NORMALIZE_GAMMA_RAMPS=False`` to disable this)\n-  GLFW errors are reported as ``glfw.GLFWError`` warnings if no error\n   callback is set (use ``glfw.ERROR_REPORTING=False`` to disable this,\n   set it to 'warn' instead to issue warnings, set it to 'log' to log it\n   using the 'glfw' logger or set it to a dict to define the behavior for\n   specific error codes)\n-  instead of a sequence for ``GLFWimage`` structs, PIL/pillow ``Image``\n   objects can be used\n\nInstallation\n------------\n\npyGLFW can be installed using pip:\n\n.. code:: sh\n\n    pip install glfw\n\nWindows\n~~~~~~~\n\nThe GLFW shared library and Visual C++ runtime are included in the Python wheels.\n\nTo use a different GLFW library, you can set ``PYGLFW_LIBRARY`` to its location.\n\nmacOS\n~~~~~\n\nThe GLFW shared library for 64-bit is included in the Python wheels for macOS.\n\nIf you are using a 32-bit Python installation or otherwise cannot use the\nlibrary downloaded with the wheel, you can build and install it yourself by\n`compiling GLFW from source \u003chttp://www.glfw.org/docs/latest/compile.html\u003e`__\n(use ``-DBUILD_SHARED_LIBS=ON``).\n\npyGLFW will search for the library in a list of search paths (including those\nin ``DYLD_LIBRARY_PATH``). If you want to use a specific library, you can set\nthe ``PYGLFW_LIBRARY`` environment variable to its path.\n\nLinux\n~~~~~\n\nThe GLFW shared library is included in the Python wheels for Linux. Although\npyGLFW will try to detect whether the GLFW library for Wayland or X11 should\nbe used, you can set the ``PYGLFW_LIBRARY_VARIANT`` variable to ``wayland`` or\n``x11`` to select either variant of the library.\n\nIf you cannot use these on your system, you can install the GLFW shared\nlibrary using a package management system (e.g. ``apt install libglfw3``\non Debian or Ubuntu) or you can build and install it yourself by\n`compiling GLFW from source \u003chttp://www.glfw.org/docs/latest/compile.html\u003e`__\n(use ``-DBUILD_SHARED_LIBS=ON``).\n\npyGLFW will search for the library in a list of search paths (including those\nin ``LD_LIBRARY_PATH``). If you want to use a specific library, you can set\nthe ``PYGLFW_LIBRARY`` environment variable to its path.\n\ncx_Freeze / PyInstaller\n~~~~~~~~~~~~~~~~~~~~~~~\n\npyGLFW will search for the GLFW library in the current working directory, the directory\nof the executable and in the package on non-Windows platforms if running in an\nexecutable frozen with cx_Freeze or PyInstaller, unless the ``PYGLFW_LIBRARY``\nenvironment variable is set.\n\nDevelopment Version\n~~~~~~~~~~~~~~~~~~~\n\nIf you are using the development version of GLFW and would like to use wrappers\nfor currently unreleased macros and functions, you can instead install:\n\n.. code:: sh\n\n    pip install glfw[preview]\n\nor set the ``PYGLFW_PREVIEW`` environment variable.\n\nNote, however, that there will be a slight delay between the development\nversion of GLFW and the wrappers provided by this package.\n\nExample Code\n------------\n\nThe example from the `GLFW\ndocumentation \u003chttp://www.glfw.org/documentation.html\u003e`__ ported to\npyGLFW:\n\n.. code:: python\n\n    import glfw\n\n    def main():\n        # Initialize the library\n        if not glfw.init():\n            return\n        # Create a windowed mode window and its OpenGL context\n        window = glfw.create_window(640, 480, \"Hello World\", None, None)\n        if not window:\n            glfw.terminate()\n            return\n\n        # Make the window's context current\n        glfw.make_context_current(window)\n\n        # Loop until the user closes the window\n        while not glfw.window_should_close(window):\n            # Render here, e.g. using pyOpenGL\n\n            # Swap front and back buffers\n            glfw.swap_buffers(window)\n\n            # Poll for and process events\n            glfw.poll_events()\n\n        glfw.terminate()\n\n    if __name__ == \"__main__\":\n        main()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianrhiem%2Fpyglfw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorianrhiem%2Fpyglfw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianrhiem%2Fpyglfw/lists"}