Psycopg2 support for the Spans library
Project description
PsycoSpans
Psycospans brings support for Spans to Psycopg2.
PsycopSpans work by wrapping psycopg2’s connect() function and set the connection up for handling Spans’ range types.
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. Note that you must install psycopg2 manually. This is because you may use either psycopg2 or psycopg2-binary.
pip install psycospans psycopg2-binary
Documentation
For full doumentation please run pydoc psycospans from a shell.
Changelog
Version 1.0.0
Released on 9th October 2018
Added wheel
Moved unit tests out of package
Removed explicit dependency on psycopg2 since one may want to use psycopg2-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
Version 0.1.1
Released on 23rd August 2018
Fixed compatibility issue with Psycopg >= 2.5
Improved Python 3 compatibility
Version 0.1.0
Released on 12th June 2014
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PsycoSpans-1.0.0.tar.gz
.
File metadata
- Download URL: PsycoSpans-1.0.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430a6a3efbb0ee35d732b624e13cb5ddbe66d803696c466c5274823aad81da98 |
|
MD5 | 977a6d95f416fa11b70aed4b8d3b0800 |
|
BLAKE2b-256 | c4c733a1b57c8cd71dc2521e53da53129da70557ee7e52dd8c3420032a89b127 |
File details
Details for the file PsycoSpans-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: PsycoSpans-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddeca23024bc4d4a5875aea8738fde3a15142392e37448fbd3ac19a48e218659 |
|
MD5 | d9397e4532eab2fb3291a3f9eb85e7ce |
|
BLAKE2b-256 | dbcf45d0b4202e06793675a91f5b62804f201431c281b9c36e8843c8f5cb61cb |