Skip to main content

A cli tool to check and guard against anti-patterns

Project description

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

Project details


Download files

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

Source Distribution

sqlcop-0.10.18.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

sqlcop-0.10.18-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sqlcop-0.10.18.tar.gz.

File metadata

  • Download URL: sqlcop-0.10.18.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for sqlcop-0.10.18.tar.gz
Algorithm Hash digest
SHA256 f5982d20247d9b59636a8f3c7f385efe2f541795e638abe8f54a772589e01b97
MD5 c231a289feb4866b59d92de6eb3b27d7
BLAKE2b-256 58d13443693ebc96cb48074ccc0f33cff8f1d9313fdf0bfdb791a56239fb8ffe

See more details on using hashes here.

File details

Details for the file sqlcop-0.10.18-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sqlcop-0.10.18-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 85afcc0d43e6bb698ed628552c3fce0c16fb75d7b7f447e4e6e624dfe0fdece9
MD5 2c3864b912bd8f177385adca12b4e0c7
BLAKE2b-256 2c03a1865ca12d1176dbda79e54c2549882c460f279e5a81fd071cd4501a89d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page