You probably make the right decision to not use one of the centralized API (blockchain.com, etc.).
Run you own bitcoin-core fullnode(s) and connect to the RPC or REST interface.
You could connect via python with things like http://laanwj.github.io/bitcoin-python/doc/examples.html or any other RPC client.
If you need blocks / headers / chaininfos and transactions, consider enabling bitcoind
-txindex and access data over the REST API (https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md).
If you need to verify scripts, you could use libbitcoinconsensus. There is a verify function:
EXPORT_SYMBOL int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
const unsigned char *txTo , unsigned int txToLen,
unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err);