Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install clue-sqlaloader

How to install clue_sqlaloader

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install clue-sqlaloader
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.1 Available View build log
0.1 Available View build log
Windows (64-bit)
0.1.1 Available View build log
0.1 Available View build log
Mac OS X (10.5+)
0.1.1 Available View build log
0.1 Available View build log
Linux (32-bit)
0.1.1 Available View build log
0.1 Available View build log
Linux (64-bit)
0.1.1 Available View build log
0.1 Available View build log
 
Author
License
BSD
Imports
Lastest release
version 0.1.1 on Apr 22nd, 2011

Overview

clue_sqlaloader provides a mechanism for populating a sql database using SQLAlchemy and YAML.

Usage

clue_sqlaloader was primarily meant to run from inside other applications as a framework piece but can be run from the command-line as follows:

$ python -m clue_sqlaloader.__init__ sqlite:///somefile.db data.yaml

The typical way to use the loader from within Python is as follows:

from clue_sqlaloader import Loader
loader = Loader(sqlalchemy_session)
loader.load_from_yamlf('somefile.yaml')

The format of the YAML should be similar to the following:

- model: mymodule.Group
  refname: !!refname "admingroup"
  fields:
    name: admin
- model: mymodule.User
  fields:
    username: testuser1
    email: user@hisplace.com
    groups: [!!ref "admingroup"]
  execute:
    set_password: testuser1

The model and fields arguments are straightforward. The execute argument will call the given function name on the newly created object with the given value.

Credits

Written and maintained by Rocky Burt <rocky AT serverzen DOT com>

Changes

0.1.1 (Apr-21-2011)
  • Made Reference lookup a little more robust
  • Added missing dep for zope.dottedname
0.1 (Apr-12-2011)
  • first release

Subscribe to package updates

Last updated Apr 22nd, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.