Coder Social home page Coder Social logo

pg8000's Introduction

pg8000

pg8000 is a pure-Python PostgreSQL driver that complies with DB-API 2.0. The driver communicates with the database using the PostgreSQL Backend / Frontend Protocol.

CircleCI Build Status: CircleCI

Links:

Regression Tests

To run the regression tests, install tox:

pip install tox

then install all the supported Python versions (using the APT Repository if you're using Ubuntu. Install all the currently supported versions of PostgreSQL (using the APT Repository if you're using Ubuntu. Then for each of them, enable the hstore extension by running the SQL command:

create extension hstore;

and add a line to pg_hba.conf for the various authentication options, eg.

host    pg8000_md5      all             127.0.0.1/32            md5
host    pg8000_gss      all             127.0.0.1/32            gss
host    pg8000_password all             127.0.0.1/32            password
host    all             all             127.0.0.1/32            trust

Set the following environment variables for the databases, for example:

export PG8000_TEST_NAME="PG8000_TEST_9_3"
export PG8000_TEST_9_0="{'user': 'postgres', 'password': 'pw', 'port': 5432}"
export PG8000_TEST_9_1="{'user': 'postgres', 'password': 'pw', 'port': 5433}"
export PG8000_TEST_9_2="{'user': 'postgres', 'password': 'pw', 'port': 5434}"
export PG8000_TEST_9_3="{'user': 'postgres', 'password': 'pw', 'port': 5435}"

then run tox from the pg8000 directory:

tox

Unfortunately, tox doesn't support Python 2.5, so to test CPython 2.5 and Jython 2.5, run the run_25 script.

Performance Tests

To run the performance tests from the pg8000 directory:

python -m pg8000.tests.performance

Stress Test

There's a stress test that is run by doing:

python ./multi

The idea is to set in postgresql.conf to 128kB, and then run the stress test, and you should get no unpinned buffers errors.

Building The Documentation

The docs are written using Sphinx. To build them, install sphinx:

pip install sphinx

Then type:

python setup.py build_sphinx

and the docs will appear in build/sphinx/html.

Doing A Release Of pg8000

Run tox and run_25 to make sure all tests pass, then update then do:

git tag -a x.y.z -m "Version x.y.z"
python setup.py register sdist bdist_wheel upload build_sphinx upload_docs

Then post a message to the forum.

pg8000's People

Contributors

etrepum avatar gi0baro avatar hackgnar avatar lucmult avatar mfenniak avatar nad2000 avatar reingart avatar repl-mathieu-fenniak avatar sitaktif avatar tlocke avatar ulope avatar zeha avatar zzzeek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.