tg123 / bottle-mysql Goto Github PK
View Code? Open in Web Editor NEWMySQL integration for Bottle.
Home Page: https://pypi.python.org/pypi/bottle-mysql/
License: MIT License
MySQL integration for Bottle.
Home Page: https://pypi.python.org/pypi/bottle-mysql/
License: MIT License
Currently it is impossible to connect to db via unix socket.
MySQLdb suports such feature but bottle-mysql does not pass necessary parameters into connect
method.
Fix: pull request #2
Are you aware that there's a carbon copy out there on PyPI with nothing changed but the name?
Somewhat confusing for users.
Current, bottle-mysql do not support python3 due to mysqldb etc.
If I leave something like
@app.route(APPROOT + '/new', method=['GET', 'POST'])
@valid_user()
def new(db):
I get this
TypeError: new() takes exactly 1 argument (0 given)
If I do db=None
@app.route(APPROOT + '/new', method=['GET', 'POST'])
@valid_user()
def new(db=None):
I get
AttributeError: 'NoneType' object has no attribute 'execute'
Seems like the bottlesession decorator is in the way. And it's not just bottlesession
You can check with basic auth decorators as well, I had to functionally rewrite basic auth because plugin retrospection gives Nonetype object bug as well. For example this one https://gist.github.com/thinkxl/8296214
or this one
https://stackoverflow.com/questions/13272528/bottle-py-http-auth
DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
some cases require connection handle, not only the cursor.
please added.
thx
The latest pypi package is missing requirements.txt
that is referenced by setup.py
so pip install bottle-mysql
will fail with:
IOError: [Errno 2] No such file or directory: 'requirements.txt'
Installing this via pip install bottle-mysql
does not bring in all necessary requirements, mainly MySQLdb
. In turn, trying to run any code that uses a DB, will yield this error:
Traceback (most recent call last):
File "application.py", line 2, in <module>
import bottle_mysql
File "/Users/michou/git/mock/lib/python2.7/site-packages/bottle_mysql.py", line 40, in <module>
import MySQLdb
ImportError: No module named MySQLdb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.