PostgreSQL range type support for Canonical's Storm ORM using Spans
Project description
StormSpans
StormSpans brings support for PostgreSQL’s range types to Canonical’s Storm ORM using PsycoSpans paired with Spans.
This package’s functionality probably be merged with storm-legacy in the future.
Installation
Psycospans exists on PyPI.
pip install psycospans
Documentation
For full doumentation please run pydoc stormspans from a shell.
Example
from spans import intrange from storm.locals import * from stormspans import IntRange class Model(Storm): id = Int(primary=True) span = IntRange(default=intrange(1, 10)) def __init__(self, span): self.span = span # NOTE: URI must start with postgres+spans:// store = Store(create_database("postgres+spans://<url>")) store.execute(""" CREATE TABLE int_range_test( id SERIAL, span int4range ) """) store.add(Model(intrange(1, 100)) store.commit()
Changelog
Version 1.0.0
Released on 9th October 2018
- Added support for storm-legacy
- Added support for Python 3.4 and later. Note that this only work with storm-legacy since Storm is not Python 3 compatible
Version 0.1.0
Released 12th June 2014
- Initial commit
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size StormSpans-1.0.0-py2.py3-none-any.whl (6.0 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size StormSpans-1.0.0.tar.gz (7.0 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for StormSpans-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be6eaf29397afa47205ebf4023f4dca6540143bb41994bc287447ceece8b131c |
|
MD5 | ab4089f6f03bfa7b04749399a5280eeb |
|
BLAKE2-256 | 613867c38b83e0d8a63d501004816febf0b39e9816f5cb74043d7fd05c9c1898 |