{"id":13725944,"url":"https://github.com/ali5h/zig-py-sample","last_synced_at":"2025-05-07T21:30:39.192Z","repository":{"id":146651773,"uuid":"465530761","full_name":"ali5h/zig-py-sample","owner":"ali5h","description":"sample python extension in zig","archived":false,"fork":false,"pushed_at":"2022-03-20T22:16:58.000Z","size":82,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T16:44:48.623Z","etag":null,"topics":["c-extensions","python","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/ali5h.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-03T01:49:38.000Z","updated_at":"2024-09-30T01:16:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f76d154e-9112-4e8c-acbd-94b34e2594d2","html_url":"https://github.com/ali5h/zig-py-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali5h%2Fzig-py-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali5h%2Fzig-py-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali5h%2Fzig-py-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali5h%2Fzig-py-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali5h","download_url":"https://codeload.github.com/ali5h/zig-py-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252957043,"owners_count":21831423,"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":["c-extensions","python","zig"],"created_at":"2024-08-03T01:02:42.368Z","updated_at":"2025-05-07T21:30:39.177Z","avatar_url":"https://github.com/ali5h.png","language":"Zig","funding_links":[],"categories":["Zig"],"sub_categories":[],"readme":"# Sample Python Extension in Zig\n\nThis is tested on Ubuntu with `python3.8` installed.\n\n```\n# build the extension\n$ zig build\n# run zig tests\n$ zig build test\n# run python tests\n$ pytest\n```\n\n## logical division of the code\n- Pure Zig part is in `src/sum.zig`\n- Python ffi is used in `src/ffi.zig` and translated headers are in `src/python3.8.zig`\n- The extension is in `src/pysum.zig`\n- Sample app to call python code is in `src/callpy.zig`\n\n## python ffi\n\n`python3.8.zig` is generated by running\n```\n$ zig translate-c /usr/include/python3.8/Python.h -I/usr/include/python3.8 -I /usr/include -I /usr/include/x86_64-linux-gnu/ -D__sched_priority=0 -DNDEBUG \u003e src/python3.8.zig\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali5h%2Fzig-py-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali5h%2Fzig-py-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali5h%2Fzig-py-sample/lists"}