My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

This script is to automatize the translation between java's and python's datastore models.

Basicly what is does is:

  • open requested python module in search for classes which derive from : db.Model,db.Expando and polymodel.PolyModel.
  • inspect those classes in search for local variables, their types, default value(s), etc.

After parsing Java code is generated.

Supported features:

  • recognizing Python's constants ( values with uppercase names) and their default values.
  • recognizing Python's lists
  • recognizing google.appengine.ext types and translating them into Java's alternatives.
  • ability to translate complex types into Java ( types which contain other objects like lists,dictionaries,references, etc.)
  • creating getters/setters/constructors for classes and their attributes
  • adding default imports

Todo:

  • create adders/removers for List and Map attributes
  • clever imports

Usage:

    python pt2jdo.py module_name.py output_directory

Powered by Google Project Hosting