Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Latest commit

 

History

History
65 lines (36 loc) · 2.31 KB

README.md

File metadata and controls

65 lines (36 loc) · 2.31 KB

Foreign Function Interfaces for Web Developers

Language interoperability for coders with impatient users.

Video of talk available here (click on image):

video of talk on youtube


Python is a general-purpose programming language that is well-suited for a web application stack. That said, there are sometimes opportunities to increase performance or productivity by mixing the benefits of different languages, such as the expressiveness of Python with the speed of C++.

This repository contains the implementations of the techniques and ideas that were explored in a talk I gave at PyGotham 2015. If you missed the talk, it focused on interactions between Python and other programming languages within the context and contraints of coding for web applications.

The slides should be uploaded within a day of the talk and the video should be linked here when available (please open a GH issue if this is not the case).


screenshot of the web application

This repository contains a web application useful for testing various FFI approaches.


Suggested requirements

- Python 3.4
- Python 3.4 header files (python3.4-dev on Debian-based OSes if Python not from source)
- OS X or Linux
- A C and C++ compiler
    - If OS X, probably Xcode command-line tools
    - Buyer's choice on Linux (gcc is popular)

Python versions > 3.4 should also work, but have not been tested.

Installation and setup

Git clone the repo:

git clone https://github.com/tristanfisher/ffi4wd.git

Use a virtual environment to create a clean environment so our work and package installations don't affect other things on the system.

cd ffi4wd
pyvenv-3.4 env
source env/bin/activate

Make sure that you're in Python 3.4 and that your virtualenv is activated.

Run the makefile:

make all

this will install the Python requirements and compile several shared objects.

Run tests

This will give us some certainty that we've installed correctly.

Other Notes

I appreciate feedback. Please open pull requests, issues, and/or contact me.