Skip to main content

Psycopg2 support for the Spans library

Project description

Copyright (c) 2014 Andreas Runfalk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Description: PsycoSpans
==========
Psycospans brings support for Spans [#]_ to Psycopg2 [#]_. The Spans library
implements PostgreSQL's range types [#]_ in pure Python.

.. code-block:: 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.

.. [#] https://github.com/runfalk/spans
.. [#] http://initd.org/psycopg/
.. [#] http://www.postgresql.org/docs/9.2/static/rangetypes.html

Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Database
Classifier: Topic :: Utilities

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.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

PsycoSpans-0.1.1-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: PsycoSpans-0.1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15rc1

File hashes

Hashes for PsycoSpans-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f03785e05fd54b745989753763832c0f42e07cbb40f7e636e30aab830653a1a0
MD5 5a789281f14cfd8f676b1fe0a26ab6fa
BLAKE2b-256 67de8453318dc7db10f218f02f6aadaa58311f2ce53c7aeef0497d8c8cbe6ef7

See more details on using hashes here.

File details

Details for the file PsycoSpans-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: PsycoSpans-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15rc1

File hashes

Hashes for PsycoSpans-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e508f737e2f3778645f4c7d9e080ff97bcef99a2b7e198fadcfa95778a2c4bd3
MD5 28c04421a661ad721d08f2d955416fbc
BLAKE2b-256 20c67da12f64cc5472dceda54867d86ae55128361c47a84c5900e8a092e5893e

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