<commit_before># rawsql: A library for *using* SQL. [![Build Status](https://travis-ci.org/zacharydenton/rawsql.svg)](https://travis-ci.org/zacharydenton/rawsql)

rawsql is a Python library that makes it easy to use plain SQL in your projects. You can use it with any [DB-API](https://www.python.org/dev/peps/pep-0249/) compliant database adapter, like `MySQLdb` and `psycopg2`.

## Installation

```shell
$ pip install rawsql
```

## Usage

First you need to put your query in a file:

```sql
-- retrieves a list of unique movie titles for a given year.
select distinct title from movies where year = ?
```

Then you can use the query in Python:

```python
import sqlite3<commit_msg>Amend pip installation command.<commit_after># rawsql: A library for *using* SQL. [![Build Status](https://travis-ci.org/zacharydenton/rawsql.svg)](https://travis-ci.org/zacharydenton/rawsql)

rawsql is a Python library that makes it easy to use plain SQL in your projects. You can use it with any [DB-API](https://www.python.org/dev/peps/pep-0249/) compliant database adapter, like `MySQLdb` and `psycopg2`.

## Installation

```shell
$ pip install git+git://github.com/zacharydenton/rawsql
```

## Usage

First you need to put your query in a file:

```sql
-- retrieves a list of unique movie titles for a given year.
select distinct title from movies where year = ?
```

Then you can use the query in Python:

```python
import sqlite3
{'fraction_non_alphanumeric': 0.11963406052076003, 'fraction_numerical': 0.00844475721323012, 'mean_word_length': 4.3059701492537314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '36078', 'n_tokens_mistral': 474, 'n_tokens_neox': 453, 'n_words': 172}