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

Enhancement: Slim down minimum required dependencies #2397

Open
provinzkraut opened this issue Oct 3, 2023 · 7 comments
Open

Enhancement: Slim down minimum required dependencies #2397

provinzkraut opened this issue Oct 3, 2023 · 7 comments
Labels
Enhancement This is a new feature or request Infrastructure This is Infrastructure related
Milestone

Comments

@provinzkraut
Copy link
Member

provinzkraut commented Oct 3, 2023

Summary

Ideally we want the base litestar package to have as few dependencies as possible. Right now we install a lot of extra packages that aren't actually needed for the core functionality.
These fall roughly into two groups: Speedups and additional features.

Speedups include:

Additional features:

Libraries required for Litestar to work

  • anyio
  • msgspec

The goal would be to exclude everything that's not strictly necessary from the base install and make it available through package extras, which could be included in the standard extra as well. This is a common practice and is used by packages like uvicorn, starlette and fastapi.


The plan is to work on these without breaking anything, and removing the packages as required dependencies once we hit 3.0.

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


Funding

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@provinzkraut provinzkraut added the Enhancement This is a new feature or request label Oct 3, 2023
@provinzkraut provinzkraut added this to the 3.0 milestone Oct 3, 2023
@hyperknot
Copy link
Contributor

hyperknot commented Oct 9, 2023

I find it a bit strange that fast-query-parsers is included only with [standard], but standard also includes jinja2.

But jinja2 is quite bloated and makes no sense for a JSON API (the typical use case of litestar I guess), so installing standard is not a good idea if you only need a JSON API. But then fast-query-parsers has to be installed manually.

Currently, I'm installing it via:

litestar[sqlalchemy,cli] 
fast-query-parsers

@JacobCoffee JacobCoffee added the Infrastructure This is Infrastructure related label Dec 8, 2023
@JacobCoffee
Copy link
Member

Some more data in #2844

@github-project-automation github-project-automation bot moved this to Triage in Overview Dec 8, 2023
@JacobCoffee JacobCoffee moved this from Triage to Ideas in Overview Dec 8, 2023
@rafalkrupinski

This comment was marked as off-topic.

@FHU-yezi

This comment was marked as off-topic.

@rafalkrupinski

This comment was marked as off-topic.

@peterschutt

This comment was marked as off-topic.

@rafalkrupinski

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This is a new feature or request Infrastructure This is Infrastructure related
Projects
Status: Ideas
Development

No branches or pull requests

6 participants