I wish to service queries about aliases by Postfix in real-time. Is it possible to retrieve Postfix aliases from an external script?
Yes. You can configure Postfix to query your Python daemon about aliases using the socketmap protocol.
There are a few implementations of socketmap daemons in python. E.g. pysrs.
Here are a few links that you can reference to get everything set up properly:
Postfix alias_database documentation.
Postfix database lookup table types.
Postfix socketmap_table documentation.