sqlalchemy console /

Filename Size Date modified Message
sqlalchemy_console
64 B
745 B
2.0 KB
33.7 KB
9.1 KB
1.2 KB

sqlalchemy_console - an sql console based on sqlalchemy

sqlalchemy console allows you to connect to any of the databases supported by sqlalchemy and run an interactive database command line against it.

Features

  • enumerate tables
  • describe tables
  • display output of queries
  • output is ANSI color highlighted
  • in interactive mode output continuation prompt every 10 rows
  • execute arbitary queries
  • if supported by the database, row counts displayed for queries
  • interactive python command line with meta and tables in locals
  • execution of scripts both from the shell and interactive command line
  • execution of single python commands inside the command line
  • error messages in red
  • persistent readline history

Screenshot

http://codeflow.org/projects/sqlalchemy_console/screenshot.png

Install

sqlalchemy console is a python package any of the following commands: command line:

cd sqlalchemy_console; python setup.py install
easy_install sqlalchemy_console
easy_install http://hg.codeflow.org/sqlalchemy_console/archive/tip.tar.gz

Usage

command line::
sqlac [script] --url <database url> --command <command> --no-color --debug

DB URLs

The db URLs accepted by sqlalchemy console are defined by sqlalchemy. for example, these are valid URLs:

sqlite:////absolute/path/to/database.txt
sqlite:///relative/path/to/database.txt
sqlite://:memory:
mysql://localhost/foo
oracle://scott:tiger@dsn
oracle://scott:tiger@127.0.0.1:1521/sidname
mssql://username:password@localhost/database
mssql://username:password@/?dsn=mydsn

For further reference see: http://www.sqlalchemy.org/docs/05/dbengine.html#create-engine-url-arguments

copyright:2009 by Florian Boesch
license:GNU AGPL3, see LICENSE for more details
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.