In Stata 16.0 or higher, you can embed and execute Python code from within Stata. You can invoke Python interactively or in do-files and ado-files so that you can leverage Python's extensive language features. You can read more about using Python with Stata in [P] python.
Additionally, the Stata Function Interface (sfi) Python module is included which allows you to interact Python's capabilities with Stata's core features. Within the module, classes are defined to provide access to Stata's current dataset, frames, macros, scalars, matrices, value labels, characteristics, global Mata matrices, and more. See Stata's Python API documentation for more details.
You can read more about Python integration in [P] python.