skip to navigation
skip to content

PsycoSpans 0.1.0

Psycopg2 support for the Spans library

Psycospans brings support for Spans [1] to Psycopg2 [2]. The Spans library implements PostgreSQL’s range types [3] in pure Python.

from psycospans import connect

conn = 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 # True
other_range == intrange(5) # True


Psycospans will only work with PostgreSQL 9.2 or later.


Psycospans exists on PyPI.

pip install psycospans


For full doumentation please run pydoc psycospans from a shell.

File Type Py Version Uploaded on Size
PsycoSpans-0.1.0.tar.gz (md5) Source 2014-06-12 6KB
  • Downloads (All Versions):
  • 1 downloads in the last day
  • 16 downloads in the last week
  • 93 downloads in the last month