I released sqlautocode 0.7 today. This release was based on feedback from a few users, and adds support for sqlalchemy 0.7 and python 2.7. Here's a rundown of the feature changes since the last release:
0.7 (8-20-2011) SA 0.7 Support Python 2.7 Support Declarative supports tables with compound foreign keys. Declarative supports tables with no primary keys. Declarative support limits to tables. (-t option) Declarative tolarant of bad relations. (throws warnings) As you can see, the declarative part of the application has been beefed up significantly. In case you are not familiar with sqlautocode, it allows the user to create an sqlalchemy model (table or declarative definitions) given a target database. This allows a simpler path for project startup. Also, sqlautocode is intended to be an api library, which means that you can use it programatically to dynamically create models for use without outputting source code, admittedly, the documentation for this api is lacking. To use: $easy_install sqlautocode $sqlautocode --help: Usage: autocode.py <database_url> [options, ] Generates Python source code for a given database schema. Example: ./autocode.py postgres://user:password@myhost/database -o out.py Options: -h, --help show this help message and exit -o OUTPUT, --output=OUTPUT Write to file (default is stdout) --force Overwrite Write to 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 -b TABLE_PREFIX, --table-prefix=TABLE_PREFIX Prefix for generated SQLAlchemy Table object names -a TABLE_SUFFIX, --table-suffix=TABLE_SUFFIX Suffix for generated SQLAlchemy Table object names -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 -3, --z3c Generate code for use with z3c.sqlalchemy -d, --declarative Generate declarative SA code -n, --interactive Generate Interactive example in your code. sqlautocode can be found on pypi at: http://pypi.python.org/pypi/sqlautocode/0.7 cheers. -chris -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.