• Stars
    star
    680
  • Rank 66,440 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A HugSQL-inspired database library for Python

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

More Repositories

1

better-keynote-export

A better export for sharing Keynote presentations, with support for presenter notes.
Python
237
star
2

juds

A Unix domain socket library for Java
Java
184
star
3

etsy-python

Python access to the Etsy API
Python
66
star
4

experiment-model

experimentcalculator.com
JavaScript
55
star
5

oplogutils

Utilities for inspecting and manipulating the MongoDB oplog
Python
38
star
6

pgproxy

A unit/functional testing proxy for Postgres.
Python
28
star
7

php-heap

GDB functions for debugging and analyzing the PHP heap
Python
18
star
8

clippingsbot

Nerdfight monitoring service
Python
10
star
9

shaken-stocks

Some historical analysis of stocks that experience a serious drop in value.
Python
8
star
10

scala-phps

A Scala language reader for the PHP serialization format.
Scala
8
star
11

sbt-mongodb-plugin

Adds support for a MongoDB test fixture database in simple-build-tool.
Scala
7
star
12

lacrime

Investigating LA City Crime Data
Python
5
star
13

sbt-sqlite-plugin

A simple-build-tool plugin that adds support for sqlite fixtures.
Scala
4
star
14

kinetic-antfarm

A silly KineticJS ant farm animation. From a larger dead project.
JavaScript
4
star
15

confluence2.el

An Atlassian Confluence mode for emacs that does not depend on xmlrpc.el.
Emacs Lisp
3
star
16

boringtechnology.club

http://boringtechnology.club
HTML
3
star
17

career-fair

Quick hack for career fair laptop displays. Runs a loop of websites and/or videos.
Python
3
star
18

minesweeper-clone

A Minesweeper Clone
C#
2
star
19

statsdump

Simple script to analyze statsd UDP traffic.
Python
2
star
20

euler

My Project Euler solutions
Haskell
2
star
21

optimizely-changes

A Google Cloud Function that sends Slack notifications for production-affecting Optimizely changes.
Python
2
star
22

etsy-esp

ESP Game for Etsy Items
JavaScript
2
star
23

pgBoard

A pretty good board...
2
star
24

jacques

JVM remote debugging utility.
Scala
2
star
25

datadriven.club

Data Driven Products Now!
HTML
1
star
26

sc2analysis

Python
1
star
27

causalinference.club

HTML
1
star
28

bon-appetit-rankings

The Definitive Bon Appetit Test Kitchen ca. 2020 Classic Lineup Power Rankings, Visualized
Python
1
star
29

dotemacs

My elisp.
Emacs Lisp
1
star
30

dotfiles

Emacs Lisp
1
star
31

ehrenfest

Ehrenfest's Urn in Processing
1
star
32

buddhabrot

Renders the Buddhabrot plot.
C
1
star
33

advent-of-code

Python
1
star