import bottle.ext... not pythonic
See original GitHub issueexample:
from bottle.ext import sqlalchemy
It is not very pythonic, we are bringing spells (not leaving explicit where the package comes from).
This python:
...
Explicit is better than implicit.
...
What’s your opinions?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Command Line Interface: bottle.ext ImportError #334 - GitHub
To reproduce the issue: Install a virtual environment: $ virtualenv --no-site-packages venv $ venv/bin/pip install bottle bottle-sqlalchemy ...
Read more >Tutorial — Bottle 0.13-dev documentation
Bottle returns strings as a whole (instead of iterating over each char) and adds a Content-Length header based on the string length. Lists...
Read more >Unable to import a package in Python - Stack Overflow
I am using Python 3.8.6 with pipenv. The commands I runned were the following: pipenv shell pipenv install bottle. The code in the...
Read more >How to use the bottle.Bottle function in bottle - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... #!/usr/bin/python from bottle import run,route,app,request,response ......
Read more >Bottle - Read the Docs
Templates: Fast and pythonic built-in template engine and support for mako, jinja2 and cheetah ... Bottle does not depend on any external libraries....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think that explicit import is the best way to go for many reasons. Although I believe that python “magic” could work in some scenarios to provide a nice API, in this case i agree that explicit import in this case is better. For instance:
New (python) users that chose bottle.py for a single project for it’s simplicity should not have to deal with this.
Decouple from package management: Instead of
from bottle.ext.jwt import JWTPLuginthe equilevantfrom bottle_jwt import JWTPluginis more clear. Image the confusion with two different plugins with similar name conventions.
@defnull what you opinion?