Autonomous Systems (ASes) make the internet. Communications between the ASes are handled through implementations of protocols known as Exterior Gateway Protocols (EGP). Border Gateway Protocol (BGP) is a standardized EGP, designed for exchanging routing and reachability information between the ASes. In this chapter, we will look into Python libraries for BGP such as exabgp and yabgp, and how to program the internet with Python.