Code Monkey home page Code Monkey logo

cextensions's Introduction

Writing C Extensions, Python/C API

The idea behind this repo is to start building core knowledge on how to extend Python with C or C++. So dont hesitate to be verbose on code comments or README.

Guidelines

src

Please follow the guideline below when committing examples of C extensions.

  1. Create new folder under src named accordingly to the example, i.e. list
  2. Create 1 or 2 subfolders when adequate, py, c. If this code is done from scratch using PYTHON/C API no need to create the c folder. If you are rewriting some C sources as an extension, please paste those on c so we can use that as reference when reading.
  3. Create setup.py
  4. Provide additionals Readme if suitable

tests

One file with the same name as the example you are posting.

Current

  • llist: simple rewriting of a linked list interface written by me a long time ago.
  • numpy: code from here. Useful whenever the time comes to do some more fancy shit using arrayobjects.

Resources to Start

  1. As a first step I would suggest this
  2. More on Reference Counting mainly extensionpatterns
  3. numpy np

cextensions's People

Contributors

ivanbelenky avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.