- Notifications
You must be signed in to change notification settings - Fork1
Psycopg2 support for the Spans library
License
NotificationsYou must be signed in to change notification settings
runfalk/psycospans
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Psycospans brings support forSpans toPsycopg2.
PsycopSpans work by wrapping psycopg2'sconnect()
function and set theconnection up for handling Spans' range types.
frompsycospansimportconnectconn=connect("dbname=test")cur=conn.cursor()test_range=intrange(1,10)cur.execute("SELECT int4range(5, NULL), %s", (test_range,))other_range,test_range_cmp=cur.fetchone()test_range==test_range_cmp# Trueother_range==intrange(5)# True
Psycospans will only work with PostgreSQL 9.2 or later.
Psycospans exists on PyPI. Note that you must installpsycopg2
manually.This is because you may use eitherpsycopg2
orpsycopg2-binary
.
pip install psycospans psycopg2-binary
For full doumentation please runpydoc psycospans
from a shell.
Released on 9th October 2018
- Added wheel
- Moved unit tests out of package
- Removed explicit dependency on
psycopg2
since one may want to usepsycopg2-binary
- Removed Python 3.3 support. Requires 2.7 or 3.4 or greater
- Removed Tox usage for development
- Use pytest to run test suite
Released on 23rd August 2018
- Fixed compatibility issue with Psycopg >= 2.5
- Improved Python 3 compatibility
Released on 12th June 2014
- Initial release