Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Psycopg2 support for the Spans library

Project Description

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

Requirements

Psycospans will only work with PostgreSQL 9.2 or later.

Installation

Psycospans exists on PyPI.

pip install psycospans

Documentation

For full doumentation please run pydoc psycospans from a shell.

[1]https://github.com/runfalk/spans
[2]http://initd.org/psycopg/
[3]http://www.postgresql.org/docs/9.2/static/rangetypes.html
Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PsycoSpans-0.1.0.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source Jun 12, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting