Skip to main content

Fast postgres hstore parser.

Project description

Info:

cpghstore is a fast decoder/encoder of the PostgreSQL hstore data type (http://www.postgresql.org/docs/9.0/static/hstore.html).

Author:

Robert Kajic (http://github.com/kajic)

About

cpghstore is written in C and is meant to be a faster alternative to pghstore. Run python setup.py test -s benchmark to see how it performs (requires pghstore to be installed if you want comparisons to be shown).

Installation

Run pip install cpghstore or download the source from GitHub and run python setup.py install.

Usage

Decode and encode hstore string:

>>> import cpghstore
>>> # decode
>>> d = cpghstore.loads('"name"=>"Norge/Noreg"')
>>> d
{'name': 'Norge/Noreg'}
>>> # encode
>>> s = cpghstore.dumps(d)
>>> s
'"name"=>"Norge/Noreg"'

Tests

To run the test suite, run python setup.py test.

Benchmark

Run python setup.py test -s benchmark to see how it performs (requires pghstore to be installed if you want comparisons to be shown).

Limitations

Supports only str strings (i.e. not unicode strings). Can only decode (loads) string values, i.e. “key”=>”123” is supported while “key”=>123 is not.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpghstore-0.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpghstore-0.1-py2.7-macosx-10.4-x86_64.egg (5.2 kB view details)

Uploaded Egg

File details

Details for the file cpghstore-0.1.tar.gz.

File metadata

  • Download URL: cpghstore-0.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cpghstore-0.1.tar.gz
Algorithm Hash digest
SHA256 9ce3a479852a446147d5c3dc4c7758af82266263ce968496b55a259b0297acf2
MD5 6ac36c09367be3738c671298d3f33220
BLAKE2b-256 855987a52e06a94e19d7696ce9d31d00b443412bfd8285469caa537857e741eb

See more details on using hashes here.

File details

Details for the file cpghstore-0.1-py2.7-macosx-10.4-x86_64.egg.

File metadata

File hashes

Hashes for cpghstore-0.1-py2.7-macosx-10.4-x86_64.egg
Algorithm Hash digest
SHA256 b9433644ce951ed3f32255271bac776eefd734e2d7f79587c39393bc177438ac
MD5 4431b75166379623cd30f3c52c129765
BLAKE2b-256 c0f0e29ba8535fca8d0efaf9d88b9c9db4864a5af2c614decab9b6676ee89bac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page