Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runfalk/psycospans
Psycopg2 support for the Spans library
https://github.com/runfalk/psycospans
postgresql psycopg2 python python-2 python-3 range
Last synced: 29 days ago
JSON representation
Psycopg2 support for the Spans library
- Host: GitHub
- URL: https://github.com/runfalk/psycospans
- Owner: runfalk
- License: mit
- Created: 2014-06-12T15:50:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T14:16:14.000Z (about 6 years ago)
- Last Synced: 2024-03-22T21:47:17.194Z (8 months ago)
- Topics: postgresql, psycopg2, python, python-2, python-3, range
- Language: Python
- Size: 11.7 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
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... 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) # TrueRequirements
------------
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 suiteVersion 0.1.1
-------------
Released on 23rd August 2018- Fixed compatibility issue with Psycopg >= 2.5
- Improved Python 3 compatibilityVersion 0.1.0
-------------
Released on 12th June 2014- Initial release