Skip to main content

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.

Project details


Download files

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

Source Distribution

PsycoSpans-0.1.0.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file PsycoSpans-0.1.0.tar.gz.

File metadata

  • Download URL: PsycoSpans-0.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PsycoSpans-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b1c9e68795fcc53f6f9fcd5d24354ab5bc594d13a7d11ec750a74d36826a97d
MD5 d1a1f05777fe4f64bcdeed077921ffee
BLAKE2b-256 65dd316d21844c0cf79d93214da44ab0c00ce98f7df3b46651186a80c22e86fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page