{"id":16860775,"url":"https://github.com/keikoro/extending_python","last_synced_at":"2026-03-10T19:32:46.244Z","repository":{"id":71629073,"uuid":"63630157","full_name":"keikoro/extending_python","owner":"keikoro","description":"Small example project to demonstrate how to extend Python with C code :snake::new:","archived":false,"fork":false,"pushed_at":"2020-02-05T00:39:53.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T04:30:42.739Z","etag":null,"topics":["c","cpython","python"],"latest_commit_sha":null,"homepage":"","language":"C","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/keikoro.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}},"created_at":"2016-07-18T19:15:39.000Z","updated_at":"2020-02-05T00:39:55.000Z","dependencies_parsed_at":"2023-05-03T09:31:59.779Z","dependency_job_id":null,"html_url":"https://github.com/keikoro/extending_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/keikoro/extending_python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keikoro%2Fextending_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keikoro%2Fextending_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keikoro%2Fextending_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keikoro%2Fextending_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keikoro","download_url":"https://codeload.github.com/keikoro/extending_python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keikoro%2Fextending_python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30350094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["c","cpython","python"],"created_at":"2024-10-13T14:26:49.288Z","updated_at":"2026-03-10T19:32:46.194Z","avatar_url":"https://github.com/keikoro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extending Python (with C) – example project\n\nC extension for a module with a method to **look up Pokémon by their index number**.\n\nProject based on information found in [a blog post on writing extensions](http://adamlamers.com/post/NUBSPFQJ50J1) by Adam Lamers, the official [Python documentation on building C and C++ extension](https://docs.python.org/3/extending/building.html) and various other bits and pieces on the topic found online.\n\n\n## Installation\n\nMake sure to work in a virtual environment if you want to install the extension with `pip`.\n\nIn your venv, run:\n\n```\n$ pip install .\n```\n\nto have `pip` install the extension using `setup.py`.\n\nAlternatively, you can run `setup.py` manually with:\n\n```\n$ python3 setup.py build_ext --inplace\n```\n\nto have the C code compiled into a shared object file (`.so`) in your venv.\n\n\n## Usage\n\nTo start the Python script with which you can test the module, use:\n\n```\n$ python3 test_extension.py\n```\n\n## Resources\n\nThe Pokédex (index or \"catalogue\" of all Pokémon) used in this example project is based on the [list of Pokémon](http://pokemon.wikia.com/wiki/List_of_Pok%C3%A9mon) found on [The Pokémon Wiki](http://pokemon.wikia.com/wiki/Pok%C3%A9mon_Wiki).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeikoro%2Fextending_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeikoro%2Fextending_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeikoro%2Fextending_python/lists"}