Database driver to add Microsoft SQL Server/Azure support to Peewee
In it’s current state you should be able to access data and possibly do certain updates. You will not be able to create tables or introspect existing databases, so you will have to write your models manually. Offsets will also not work, since the query compiler will need some significant rewrite to support TSQL dialect, however limit will work (TOP).
Install the latest stable release from Pypi:
$ pip install peewee-mssql
Or alternatively, select a release or development version from Github and run:
$ python setup.py install
And then you should be able to instantiate a database as below and start building your models for accessing data:
from peewee_mssql import MssqlDatabase db = MssqlDatabase('MyDatabase', host='host.example.com', user='domain\\username', password='password')
If you are using Microsoft SQL Server 2005 you will need to use the legacy datetime data types, simple pass use_legacy_datetime=True to the database driver when initializing.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size peewee-mssql-0.1.3.tar.gz (3.9 kB)||File type Source||Python version None||Upload date||Hashes View hashes|