Open glyh opened 1 month ago
Hi, I haven't use python-fire yet, but from ConfZ point of view, it just checks if de CLI arg for the config source is present and ignores all other arguments. So python-fire has to ignore this one argument which ConfZ uses, maybe that's already the case and it works out if the box, or it can be configure this way.
On Sat, 28 Sept 2024, 06:19 Yihang Liu, @.***> wrote:
I would like to have source from cli args, and still being able to use python-fire https://github.com/google/python-fire.
Is there a solution? Thanks :)
— Reply to this email directly, view it on GitHub https://github.com/Zuehlke/ConfZ/issues/99, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOA7GKNZHJWHHSVDURZ4M3ZYYU3PAVCNFSM6AAAAABPAIF76SVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2TGOJZG43DCMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I think I want to clarify it a bit. python-fire has the ability of looking into a data structure and generate the CLI interface by itself, which is similar to pydantic. End user only need to specify the data structure and pydantic/python-fire can generate relevant code. I'm wondering if it's possible to specify my config once and let both python-fire and confz recognize them without interfering.
Ok, I think I understand. ConfZ is directly based on pydantic, so everything pydantic understands is also understood by ConfZ. Can't provide much more info however, since I haven't used python-fire, sorry...
On Sun, 29 Sept 2024, 12:12 Yihang Liu, @.***> wrote:
I think I want to clarify it a bit. python-fire has the ability of looking into a data structure and generate the CLI interface by itself, which is similar to pydantic. End user only need to specify the data structure and pydantic/python-fire can generate relevant code. I'm wondering if it's possible to specify my config once and let both python-fire and confz recognize them without interfering.
— Reply to this email directly, view it on GitHub https://github.com/Zuehlke/ConfZ/issues/99#issuecomment-2381296182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOA7GKIBDSM3QSMQVH4I2LZY7G7ZAVCNFSM6AAAAABPAIF76SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGI4TMMJYGI . You are receiving this because you commented.Message ID: @.***>
I would like to have source from cli args, and still being able to use python-fire.
Is there a solution? Thanks :)