Shows how to implement context-aware APIs in different languages.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
account
test
.clang-format
.gitignore
.travis.yml
CMakeLists.txt
LICENSE
README.md
requirements.txt
setup.py

README.md

Build Status License

context-api-example

Shows how to implement and use context-aware APIs in C++, Fortran, and Python. Inspired by Armin Ronacher's "Beautiful Native Libraries".

Comments, contributions, and improvements are most welcome!

How to build and run this demo

Install Python dependencies

$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Configure and build the compiled code

$ mkdir build
$ cd build
$ cmake ..
$ make

Test the C++/Fortran interfaces

$ make test

Test the Python interface

$ ACCOUNT_LIBRARY_DIR=$PWD/build/lib ACCOUNT_INCLUDE_DIR=$PWD/account PYTHONPATH=$PWD pytest -vv test/test.py