from configparser import RawConfigParser config = RawConfigParser() config.read( filenames='./config.ini', ) class VK: access_token = config.get( section='VK', option='access_token', )