Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/paulross/pythonextensionpatterns

Examples of safe coding practice for Python C extensions.
https://github.com/paulross/pythonextensionpatterns

c python python-c-api python-extension

Last synced: 5 days ago
JSON representation

Examples of safe coding practice for Python C extensions.

Awesome Lists containing this project

README

        

***************************
PythonExtensionPatterns
***************************

If you need to write C extension for Python then this is the place for you.

The full documentation is on
`Read the Docs `_.

Code examples and documentation source are right here on GitHub.

==================
Videos
==================

I have presented some of this, well mostly the chapter "PyObjects and Reference Counting",
at Python conferences so if you prefer videos they are here:

- `PyCon UK 2015 `_
- `PyCon US 2016 `_

====================================
Subjects Covered
====================================

- Introduction
- A Simple Example
- PyObjects and Reference Counting
- Exception Raising
- A Pythonic Coding Pattern for C Functions
- Parsing Python Arguments
- Creating New Types
- Setting and Getting Module Globals
- Logging
- File Paths and Files
- Subclassing and Using super()
- Capsules
- Iterators and Generators
- Pickling C Extension Types
- Setting Compiler Flags
- Debugging
- Memory Leaks
- Thread Safety
- Source Code Layout
- Using C++ With CPython Code
- Miscellaneous
- Further Reading