# Reading extension configuration

**URL:** <https://discourse.mopidy.com/t/reading-extension-configuration/5915>\
**Category:** Misc\
**Created:** [March 24, 2024, 10:28am UTC](https://discourse.mopidy.com/t/reading-extension-configuration/5915 "2024-03-24T10:28:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmarzocca](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/fmarzocca/32/1095_2.png) [@fmarzocca](https://discourse.mopidy.com/u/fmarzocca)\
**Post date:** [March 24, 2024, 10:28am UTC](https://discourse.mopidy.com/t/reading-extension-configuration/5915/1 "2024-03-24T10:28:55Z")

</div>

Hi,

how can I read, from a python script, the configuration settings for an Extension module?

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 24, 2024, 11:09am UTC](https://discourse.mopidy.com/t/reading-extension-configuration/5915/2 "2024-03-24T11:09:30Z")

</div>

Pipe the output of ‘mopidy config’ into a python module that can read ini format, such as the built-in python config parser.

---

<div class="post-metadata">

**Author:** ![fmarzocca](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/fmarzocca/32/1095_2.png) [@fmarzocca](https://discourse.mopidy.com/u/fmarzocca)\
**Post date:** [March 24, 2024, 11:36am UTC](https://discourse.mopidy.com/t/reading-extension-configuration/5915/3 "2024-03-24T11:36:47Z")

</div>

Yes, I thought that, but is there a more direct way, by importing the module and read its extension? Otherwise I should pipe `sudo mopidyctl config` as I am running mopidy as a service, and it is not so fast.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 24, 2024, 1:34pm UTC](https://discourse.mopidy.com/t/reading-extension-configuration/5915/4 "2024-03-24T13:34:02Z")

</div>

No, there’s not a simple way to do that. The paths for the config files to use would all be wrong.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/system/32/1_2.png) [@system](https://discourse.mopidy.com/u/system)\
**Post date:** [March 27, 2024, 3:02pm UTC](https://discourse.mopidy.com/t/reading-extension-configuration/5915/6 "2024-03-27T15:02:59Z")

</div>

Closed on March 27, 2024, 3:02pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
