Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty accessing plugin settings programmatically with Python #2705

Closed
Attack825 opened this issue May 20, 2024 · 2 comments
Closed

Difficulty accessing plugin settings programmatically with Python #2705

Attack825 opened this issue May 20, 2024 · 2 comments
Labels
question/discussion Further information is requested/discussion about a topic

Comments

@Attack825
Copy link

Description:
I am facing challenges in retrieving the settings of my plugin using Python code. I need to programmatically access and retrieve the user-defined settings values within my Python script, but I am unsure about the appropriate method or API to accomplish this.
I have reviewed the plugin documentation and explored the available code files, but I haven't found clear instructions on how to fetch the plugin settings using Python. Could you please provide guidance on how to access and retrieve the plugin settings programmatically using Python?

@jjw24
Copy link
Member

jjw24 commented May 20, 2024

Hi there, what you are after is the JSON RPC settings page:
https://www.flowlauncher.com/docs/#/json-rpc-settings?id=plugin-settings

You can also create with a visual editor.
https://www.flowlauncher.com/docs/#/json-rpc-visual-settingstemplate-editor?id=settingstemplateyaml-editor

To read in the settings, try it with @Garulf's pyflowlauncher library, something like this https://github.com/Garulf/Github-Quick-Launcher/blob/f803b5f24f8ce8634d86de53cb9a202a25ec40b9/src/query.py#L16, this library should already have done the heavy lifting for your code.

Hope this helps, let us know if you are still stuck.

@Attack825
Copy link
Author

I wanted to extend my heartfelt thanks for your invaluable guidance. the pyflowlauncher library, was immensely helpful in completing my plugin.

@jjw24 jjw24 added the question/discussion Further information is requested/discussion about a topic label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question/discussion Further information is requested/discussion about a topic
Projects
None yet
Development

No branches or pull requests

2 participants