Demonstration usage of the Pact FFI Library with Python.
Available to try out as a Killercoda example https://killercoda.com/safdotdev/course/safacoda/grpc_plugins_quick_start_python
Based on some of the original work done by Elliot Murray and Mike Geeves
Uses the same examples as demonstrated here
- HTTP & Message Pact Examples, as shown in examples in other languages
- https://github.com/YOU54F/pact-ruby-ffi/tree/main/spec
- https://github.com/pact-foundation/pact-reference/blob/master/javascript/lib/simple_pact.js
- https://github.com/pact-foundation/pact-reference/blob/master/ruby/example_consumer_spec/spec/simple_consumer_spec.rb
- https://github.com/pact-foundation/pact-reference/blob/master/php/src/consumer-1.php
- https://github.com/pact-foundation/pact-reference/blob/master/php/src/consumer-2.php
- Area Calculator Pact Plugin gRPC examples
- Python 3.8 / 3.9 / 3.10
- Pact FFI Library for OS
- (install with
make setup
)
- (install with
- Pact FFI Header file
- (install with
make setup
)
- (install with
CFFI
- (install with
make install
)
- (install with
make setup
make install
make run_hello_ffi
- Retrieve Pact Ruby Standalone
- Retrieve Pact FFI Binary for Platform
- Retrieve Pact FFI Header file
- Parse Pact FFI Header File
- Print out Pact FFI Version
We need to remove these lines in order to load the full header file
#ifndef pact_ffi_h
#define pact_ffi_h
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#endif /* pact_ffi_h */