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

Refactor: Clean up the starlite namespace #1135

Closed
provinzkraut opened this issue Feb 3, 2023 · 2 comments · Fixed by #1142
Closed

Refactor: Clean up the starlite namespace #1135

provinzkraut opened this issue Feb 3, 2023 · 2 comments · Fixed by #1142
Assignees
Labels
Refactor This is an improvement to existing code or configuration
Milestone

Comments

@provinzkraut
Copy link
Member

We currently export a great many things from the starlite module, which not only makes it a bit cluttered, but also results in a significant impact on startup time, causing trouble when trying to use Starlite for serverless, or other environments where frequent code reloading is required.

The top level starlite module should only include the basic building blocks, for example:

  • the Starlite class
  • handler decorators (get, post, etc.)
  • Controller
  • Router
  • Request
  • Response
  • Provide

Not needed are things like:

  • AbstractAsyncClassicPaginator
  • OpenAPIMediaType
  • AbstractAuthenticationMiddleware
  • OpenAPIController
  • AsyncTestClient

These are not meant to be exhaustive lists of course, and are mainly provided to give an idea of what should be included.

@provinzkraut provinzkraut added the Enhancement This is a new feature or request label Feb 3, 2023
@provinzkraut provinzkraut added this to the 2.0 milestone Feb 3, 2023
@Goldziher Goldziher added Refactor This is an improvement to existing code or configuration and removed Enhancement This is a new feature or request labels Feb 3, 2023
@Goldziher Goldziher changed the title Enhancement: Clean up the starlite namespace Refactor: Clean up the starlite namespace Feb 3, 2023
@provinzkraut provinzkraut self-assigned this Feb 3, 2023
@provinzkraut
Copy link
Member Author

@starlite-api/maintainers Should we also clean up the submodule namespaces in the same manner?

@Goldziher
Copy link
Contributor

certainly

@provinzkraut provinzkraut linked a pull request Feb 4, 2023 that will close this issue
4 tasks
@Goldziher Goldziher mentioned this issue Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor This is an improvement to existing code or configuration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants