Skip to main content

AutoCode is a flexible tool to autogenerate a model from an existing database.

Project description

This is a tool that helps you creating a model based on an existing database scheme. The resulting code will be compatible with sqlalchemy.

Installation:

easy_install sqlautocode
$PYTHON/bin/sqlautocode

Example:

sqlautocode postgres://user:password@myhost/database -o out.py -t person*,account

Options:

-h, --help            show this help message and exit
-o OUTPUT, --output=OUTPUT
                      Write to file (default is stdout)
--force               Overwrite file (default is stdout)
-s SCHEMA, --schema=SCHEMA
                      Optional, reflect a non-default schema
-t TABLES, --tables=TABLES
                      Optional, only reflect this comma-separated list of
                      tables. Wildcarding with '*' is supported, e.g:
                      --tables account_*,orders,order_items,*_audit
-i, --noindexes, --noindex
                      Do not emit index information
-g, --generic-types   Emit generic ANSI column types instead of database-
                      specific.
--encoding=ENCODING   Encoding for output, default utf8
-e, --example         Generate code with examples how to access data (outdated)
-3, --z3c             Generate code for use with z3c.sqlalchemy

For more information and sourcecode go to: http://code.google.com/p/sqlautocode/

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

sqlautocode-0.5.2.tar.gz (14.1 kB view hashes)

Uploaded Source

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