Skip to main content

sqlcop

A cli tool to check and guard against anti-patterns

https://badge.fury.io/py/sqlcop.png https://travis-ci.org/freshbooks/sqlcop.svg?branch=master https://pypip.in/d/sqlcop/badge.png

Installation

From PyPI:

pip install sqlcop

Usage

sqlcop is designed to use with nose-sqlcapture.

First, you use nose-sqlcapture to generate a SQL capture file:

nosetests [other options] --with-sqlcapture --sqlcapture-filename=sql.log --sqlcapture-format=json

Run sqlcop on the generated sql log fie:

sqlcop sql.log

For some checks, a database schema is needed. In that case, you need to supply the url to the database so sqlcop can grab the metadata:

sqlcop --db-urls=mysql://user:pwd@host:port/db sql.log

You can specify more than one db_urls at once:

sqlcop --db-urls=mysql://user:pwd@host:port/db1,mysql://user:pwd@host:port/db2 sql.log

Release files for sqlcop 0.10.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlcop 0.10.18
File Size Uploaded
sqlcop-0.10.18.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlcop 0.10.18
File Interpreter ABI Platform
sqlcop-0.10.18-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 15.2 kB

Release files / sqlcop-0.10.18.tar.gz

Download URL sqlcop-0.10.18.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f5982d20247d9b59636a8f3c7f385efe2f541795e638abe8f54a772589e01b97
BLAKE2b-256 checksum
How to use checksums
58d13443693ebc96cb48074ccc0f33cff8f1d9313fdf0bfdb791a56239fb8ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / sqlcop-0.10.18-py2.py3-none-any.whl

Download URL sqlcop-0.10.18-py2.py3-none-any.whl
Size 6.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
85afcc0d43e6bb698ed628552c3fce0c16fb75d7b7f447e4e6e624dfe0fdece9
BLAKE2b-256 checksum
How to use checksums
2c03a1865ca12d1176dbda79e54c2549882c460f279e5a81fd071cd4501a89d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

0.10.18 This release

2 release files

0.10.8

1 release file

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page