Skip to main content

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

Release files for PsycoSpans 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PsycoSpans 1.0.0
File Size Uploaded
PsycoSpans-1.0.0.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PsycoSpans 1.0.0
File Interpreter ABI Platform
PsycoSpans-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 12.4 kB

Release files / PsycoSpans-1.0.0.tar.gz

Download URL PsycoSpans-1.0.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
430a6a3efbb0ee35d732b624e13cb5ddbe66d803696c466c5274823aad81da98
BLAKE2b-256 checksum
How to use checksums
c4c733a1b57c8cd71dc2521e53da53129da70557ee7e52dd8c3420032a89b127
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / PsycoSpans-1.0.0-py2.py3-none-any.whl

Download URL PsycoSpans-1.0.0-py2.py3-none-any.whl
Size 5.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ddeca23024bc4d4a5875aea8738fde3a15142392e37448fbd3ac19a48e218659
BLAKE2b-256 checksum
How to use checksums
dbcf45d0b4202e06793675a91f5b62804f201431c281b9c36e8843c8f5cb61cb
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page