The Wayback Machine - https://web.archive.org/web/20201115185701/https://github.com/encode/starlette/issues/1032
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

More 'extras' installation targets #1032

Open
DrPyser opened this issue Aug 17, 2020 · 0 comments
Open

More 'extras' installation targets #1032

DrPyser opened this issue Aug 17, 2020 · 0 comments
Labels

Comments

@DrPyser
Copy link

@DrPyser DrPyser commented Aug 17, 2020

Hi!

The setup.py defines a full extra_requires target for installing starlette with all extra dependencies.

starlette/setup.py

Lines 51 to 62 in c566fc6

extras_require={
"full": [
"aiofiles",
"graphene",
"itsdangerous",
"jinja2",
"python-multipart",
"pyyaml",
"requests",
"ujson",
]
},

This is nice if you want all extra dependencies, but I doubt that's the case for many people?

In my case, I'm only interested in the session middleware.
I have to manually specify the extra dependency in my requirements along with starlette, even though I don't directly depend on it.
It would be nice to define extra_requires entries for the separate features as well, so that one can do pip install starlette[session] without needing to know which extra libraries are used for the feature(which could change in the future).

    extras_require={
        "full": [
            "aiofiles",
            "graphene",
            "itsdangerous",
            "jinja2",
            "python-multipart",
            "pyyaml",
            "requests",
            "ujson",
        ],
        "session": [ "itsdangerous" ],
        ...
    },

I could provide a PR.

@JayH5 JayH5 added the feature label Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.