Skip to content

mcfunley/pugsql

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PugSQL

PugSQL is a simple Python interface for using parameterized SQL, in files.

See pugsql.org for the documentation.

To install:

pip install pugsql

Development Setup

To set up a development environment, create a virtual environment. pyenv-virtualenv is a good way to do this:

brew install pyenv-virtualenv
pyenv virtualenv 3.8.2 pugsql
pyenv activate pugsql

Development of the library is done with poetry. Install poetry to your virtualenv:

pip install --upgrade pip
pip install poetry
poetry install

The test suite is largely written against sqlite, and also currently includes some postgresql coverage. To get postgres on a mac,

brew install postgresql
brew services start postgresql

The postgres tests will use PGUSER and a PGPASS environment variables to override the default postgres user and password, when they exist. Postgres should be hosting on 127.0.0.1:5432.

To run the tests and the linter:

poetry run pytest
poetry run flake8