pypyodbc mysql_sqlalchemy 与pypyodbc连接数据库

本文介绍了如何在PyPy环境中通过pypyodbc连接并使用SQLAlchemy操作MySQL和SQL Server数据库。首先,需要下载并安装pypyodbc和SQLAlchemy到PyPy的site-packages目录。接着,复制并修改SQLAlchemy的pyodbc驱动文件,将'pyodbc'替换为'pypyodbc'。对于SQL Server,还需要修改mssql的pyodbc.py,而MySQL则需要修改mysql的pyodbc.py。最后,通过创建'mssql+pypyodbc'或'mysql+pypyodbc'引擎,即可使用SQLAlchemy执行数据库查询。
摘要由CSDN通过智能技术生成

pypyodbc是纯python实现

但是这篇文章指导的操作我好像没有实现

文章链接:https://code.google.com/archive/p/pypyodbc/wikis/Enable_SQLAlchemy_on_PyPy.wiki

PyPy running SQLAlchemy with pypyodbc

With the pure Python ODBC library, pypyodbc, by simply extending

SQLAlchemy, PyPy also can use SQLAlchemy. There are four steps to

do so:

Install pypyodbc for PyPy

Step

1:Download

PyPyODBC Source Package, unzip the package, then copy the file

pypyodbc.py to the PyPy instance's site-packages directory:

pypy-1.9\site-packages.

This installs pypyodbc for PyPy. Now

you can try if "import

pypyodbc" succeeds in PyPy's interactive window.

Install SQLAlchemy for PyPy

You can skip this step if you know how to install SQLAlchemy for

PyPy.Download

SQLAlchemy Source Package, unzip the package, then just copy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值