Generate Python bindings on build.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05a6879..f9cbe6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,10 @@
 cmake_minimum_required(VERSION 3.10)
 include(FetchContent)
 include(GoogleTest)
+include(FindSWIG)
+include(UseSWIG)
+find_package(PythonLibs 3 REQUIRED)
+find_package(PythonInterp ${PYTHONLIBS_VERSION_STRING} REQUIRED)
 project(CPERParse)
 
 # GoogleTest requires at least C++14.
@@ -76,4 +80,18 @@
 add_custom_command(TARGET cper-convert POST_BUILD COMMAND cp -r specification/json/* bin/specification)
 
 # Add tests to GoogleTest.
-#gtest_discover_tests(cper-tests WORKING_DIRECTORY bin/)
\ No newline at end of file
+gtest_discover_tests(cper-tests WORKING_DIRECTORY bin/)
+
+# Generate Python bindings with SWIG.
+include_directories(cperparse_pylib ${PYTHON_INCLUDE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
+swig_add_library(cperparse_pylib 
+  TYPE STATIC
+  LANGUAGE python
+  SOURCES cper-parse.i
+  OUTPUT_DIR lib/
+)
+swig_link_libraries(cperparse_pylib 
+  cper-parse
+  json-c
+  ${PYTHON_LIBRARIES}
+)
\ No newline at end of file
diff --git a/README.md b/README.md
index df736ee..f445911 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,14 @@
 ```
 Help for both of these tools can be accessed through using the `--help` flag in isolation.
 
-Finally, a static library containing symbols for converting CPER and CPER-JSON between an intermediate JSON format can be found generated in `lib/`. This contains the following useful library symbols:
+Finally, a static library containing symbols for converting CPER and CPER-JSON between an intermediate JSON format can be found generated at `lib/libcper-parse.a`. This contains the following useful library symbols:
 ```
 json_object* cper_to_ir(FILE* cper_file);
 void ir_to_cper(json_object* ir, FILE* out);
 ```
 
+This library also has Python bindings generated on build, which are placed at `lib/cperparse.py`. The static library `_cperparse_pylib.a` (as well as the C file `cper-parsePYTHON_wrap.c`) are generated specifically for the purpose of wrapping types for the Python library, and should not be used as a standard static C library.
+
 ## Specification
 The specification for this project can be found in `specification/`.
 Specification for the CPER binary format can be found in [UEFI Specification Appendix N](https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf) (2021/03/18).
diff --git a/cper-parse.i b/cper-parse.i
new file mode 100644
index 0000000..fa12bc3
--- /dev/null
+++ b/cper-parse.i
@@ -0,0 +1,15 @@
+%module cperparse
+%{
+    #include "cper-parse.h"
+    #include "json.h"
+    #include <stdio.h>
+%}
+
+//Library function declarations for module export.
+json_object* cper_to_ir(FILE* cper_file);
+void ir_to_cper(json_object* ir, FILE* out);
+
+//JSON function symbol export.
+const char *json_object_to_json_string(struct json_object *obj);
+struct json_object *json_object_from_file(const char *filename);
+struct json_object *json_tokener_parse(const char *str);
\ No newline at end of file