Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evangilo/sqlalchemyp


https://github.com/evangilo/sqlalchemyp

sqlalchemy

Last synced: 21 days ago
JSON representation

Awesome Lists containing this project

README

        

# SQLAlchemy Print Query

[![Build Status](https://travis-ci.org/evangilo/sqlalchemyp.svg?branch=master)](https://travis-ci.org/evangilo/sqlalchemyp)
[![PyPI version](https://img.shields.io/pypi/v/sqlalchemyp.svg)](https://pypi.python.org/pypi/sqlalchemyp)
[![PyPI downloads](https://img.shields.io/pypi/dm/sqlalchemyp.svg)](https://pypi.python.org/pypi/sqlalchemyp)

# Install
`pip install sqlalchemyp`

# Usage

```
>>> from sqlalchemyp import print_sql
>>> print_sql(DBSession.query(Hero).filter_by(name='Spider-Man'), 'postgresql')
SELECT hero.id,
hero.name
FROM hero
WHERE hero.name = 'Spider-Man';
>>>
```