{"id":16693438,"url":"https://github.com/paulross/pythonextensionpatterns","last_synced_at":"2025-05-15T21:07:36.259Z","repository":{"id":20153263,"uuid":"23423714","full_name":"paulross/PythonExtensionPatterns","owner":"paulross","description":"Examples of safe coding practice for Python C extensions.","archived":false,"fork":false,"pushed_at":"2025-04-01T13:07:04.000Z","size":9590,"stargazers_count":230,"open_issues_count":0,"forks_count":33,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-19T02:21:11.530Z","etag":null,"topics":["c","python","python-c-api","python-extension"],"latest_commit_sha":null,"homepage":null,"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/paulross.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","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":"2014-08-28T10:13:21.000Z","updated_at":"2025-04-01T18:40:28.000Z","dependencies_parsed_at":"2024-06-26T22:53:26.210Z","dependency_job_id":"b50d6114-f7b8-42df-a717-1207275c8783","html_url":"https://github.com/paulross/PythonExtensionPatterns","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/paulross%2FPythonExtensionPatterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulross%2FPythonExtensionPatterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulross%2FPythonExtensionPatterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulross%2FPythonExtensionPatterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulross","download_url":"https://codeload.github.com/paulross/PythonExtensionPatterns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422764,"owners_count":22068678,"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","python","python-c-api","python-extension"],"created_at":"2024-10-12T16:30:31.950Z","updated_at":"2025-05-15T21:07:33.950Z","avatar_url":"https://github.com/paulross.png","language":"C","readme":"***************************\nPythonExtensionPatterns\n***************************\n\nIf you need to write C extension for Python then this is the place for you.\n\nThe full documentation is on\n`Read the Docs \u003chttp://pythonextensionpatterns.readthedocs.org/en/latest/index.html\u003e`_.\n\nCode examples and documentation source are `on GitHub \u003chttps://github.com/paulross/PythonExtensionPatterns\u003e`_.\nThe example and test code is available `on PyPi \u003chttps://pypi.org/project/cPyExtPatt\u003e`_.\n\n====================================\nSubjects Covered\n====================================\n\n- Introduction\n- A Simple Example\n- PyObjects and Reference Counting\n- Containers and Reference Counts\n- Struct Sequence Objects (a namedtuple in C)\n- Exception Raising\n- A Pythonic Coding Pattern for C Functions\n- Parsing Python Arguments\n- Creating New Types\n- Setting and Getting Module Globals\n- Logging and Frames\n- File Paths and Files\n- Subclassing and Using super()\n- Capsules\n- Iterators and Generators\n- Context Managers\n- Pickling C Extension Types\n- Watchers [Python 3.12+]\n- Setting Compiler Flags\n- Debugging\n- Memory Leaks\n- Thread Safety\n- Source Code Layout\n- Using C++ With CPython Code\n- Miscellaneous\n- Installation\n- Further Reading\n- TODO\n- History\n- Index\n\n=============\nProject Links\n=============\n\n- Source is `on GitHub \u003chttps://github.com/paulross/PythonExtensionPatterns\u003e`_.\n- Documentation `on Read the Docs \u003chttp://pythonextensionpatterns.readthedocs.org/en/latest/index.html\u003e`_.\n- Project is `on PyPi \u003chttps://pypi.org/project/cPyExtPatt\u003e`_.\n\n==================\nVideos\n==================\n\nI have presented some of this, well mostly the chapter \"PyObjects and Reference Counting\",\nat Python conferences so if you prefer videos they are here:\n\n- `PyCon UK 2015 \u003chttps://www.youtube.com/watch?v=ViRIYqiU128\u003e`_\n- `PyCon US 2016 \u003chttps://www.youtube.com/watch?v=Yq__HtUIH5Y\u003e`_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulross%2Fpythonextensionpatterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulross%2Fpythonextensionpatterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulross%2Fpythonextensionpatterns/lists"}