This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Project Description

.. image::

Mason is a nice, light-weight, SQL query builder. It lets you use objects instead of SQL strings without
having an ORM take over your database model.

.. code-block:: python

# Annoying :/
query = """
(purchases.product_price)::NUMERIC(10, 2),
FROM purchases
INNER JOIN users ON purchases.purchaser_id = users.user_id
WHERE purchases.datetime_purchased BETWEEN %(start)s AND %(end)s
AND (purchases.purchaser_id = %(user_id)s OR purchases.purchaser_id IS NULL)
ORDER BY purchases.datetime_purchased ASC

# Convenient :)
from mason import Table, Param, SELECT, AND, OR, DATE, NUMERIC

purchases = Table('purchases')
users = Table('users')
user_id = Param('user_id')
start = Param('start')
end = Param('end')

query = str(
SELECT(, purchases.product_name,
NUMERIC(purchases.product_price, 10, 2),
.INNER_JOIN(users.ON(purchases.purchaser_id == users.user_id))
OR(purchases.purchaser_id == user_id,

.. code-block:: sh

pip install mason

.. code-block:: sh

cd path/to/repos
git clone
cd mason
mkvirtualenv mason
pip install -r requirements.txt
make test
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mason-0.1.0.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source Feb 8, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting