Skip to content

[argparse] Don't instantiate Config on import Robyn #1246

@gastmaier

Description

@gastmaier

Hi, I noticed that argparse is deeply associated in Config():

https://github.com/sparckles/Robyn/blob/main/robyn/argument_parser.py#L6-L87

And that Config.init is called many times, at least from:

caller name: WebSocket
caller name: <module>
caller name: BaseRobyn
caller name: SubRouter

at import Robyn, and global defined at

https://github.com/sparckles/Robyn/blob/main/robyn/__init__.py#L58

I would like to request some reconsideration/rework on allowing robyn apps without the default argparse setup, instead, let the user cli pass the appropriate parameters.

As is, my understanding is that it is rather difficult achieve a

my_custom_cli --help

that doesn't output robyn own help

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions