You can easily create an XBRL instance document programmatically in Python. You can add objects or elements such as schema reference, context, unit, items, etc to the XBRL file. In this article, you will learn how to create XBRL instance documents using Python.