Can Python be used to query a SAP database?
Python SAP RFC module seems inactive - last (insignificant ) commit 2 years ago - but may serve you:
Pysaprfc is a wrapper around SAP librfc (librfc32.dll on Windows, librfccm.so or librfc.so on Linux). It uses the excellent ctypes extension package by Thomas Heller to access librfc and to define SAP compatible datatypes.
Modern SAP versions go the Web Service
way - you could build a SAP Web Service
and consume it from Python
.
With SAP NetWeaver, developers can connect applications and data sources to integrate processes using Web services.
In particular, developers can use one infrastructure to define, implement, and use Web services in an industry standards based way. SAP NetWeaver supports synchronous, asynchronous, stateful and stateless web service models - enabling developers to support different integration scenarios.
sapnwrfc
supports this SAP NetWeaver
functionality, supersedes the older RFC SDK, and is actively maintained.