# Python and Go : Part II - Extending Python With Go

DevFeed: [Python and Go : Part II - Extending Python With Go](<https://devfeed.tech/articles/python-and-go-part-ii-extending-python-with-go-22166.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html>)

Published: 2020-07-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Python](<https://devfeed.tech/topics/python.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [hash](<https://devfeed.tech/tags/hash.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [library](<https://devfeed.tech/tags/library.md>), [module](<https://devfeed.tech/tags/module.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

This tutorial explains how to reduce the complexity of integrating Python and Go by compiling Go code into a shared library that Python can consume through ctypes. It outlines a workflow from writing and exporting Go code to testing it interactively in Python, using parallel file-signature verification as an example.

## Source excerpt

Series Index Python and Go: Part I - gRPC Python and Go: Part II - Extending Python With Go Python and Go: Part III - Packaging Python Code Python and Go: Part IV - Using Python in Memory Introduction In the previous post we saw how a Go service can call a Python service using gRPC. Using gRPC to connect a Go and Python program together can be a great choice, but there's a complexity price that goes with it. You need to manage one more service, deployment becomes more complex, and you need monitoring plus alerting for each service. Compared to a monolithic application, there is an order of magnitude more complexity.