# InventoryManager loader

**URL:** <https://forum.ansible.com/t/inventorymanager-loader/35690>\
**Category:** Ansible Developer\
**Created:** [August 31, 2021, 10:30am UTC](https://forum.ansible.com/t/inventorymanager-loader/35690 "2021-08-31T10:30:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mandy\_Liu](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Mandy\_Liu](https://forum.ansible.com/u/Mandy_Liu)\
**Post date:** [August 31, 2021, 10:30am UTC](https://forum.ansible.com/t/inventorymanager-loader/35690/1 "2021-08-31T10:30:02Z")

</div>

Hi everyone,

I’m currently tinkering around the source code of the InventoryManager of Ansible and am currently stuck on how it normally picks up the loader and sources?  
I’m trying to inherit attributes from the InventoryManager (with super. **init** ()), but I need a loader to do so and DataLoader() doesn’t seem to give me the right sources / doesn’t parse the inventory correctly (or maybe it’s something else, but I really don’t know what).

class InventoryManager(object):  
‘’’ Creates and manages inventory ‘’’

def **init** (self, loader, sources=None, parse=True):

# base objects

self.\_loader = loader  
self.\_inventory = InventoryData()

Appreciate any help 🙂
