clue_sqlaloader
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
Metadata
Release files for clue_sqlaloader 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clue_sqlaloader-0.1.1.tar.gz | 4.1 kB | Without provenance | Details for clue_sqlaloader-0.1.1.tar.gz |
Release files / clue_sqlaloader-0.1.1.tar.gz
| Download URL | clue_sqlaloader-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
168379eac9b3f7b9d08f334c76d004653f81ff70130e72e62676c3b680654c11
|
|
BLAKE2b-256 checksum How to use checksums |
2df525c1d5dda601095c52b6c8e68ad6bb3eaca6470660f9d7b13b66a6c43208
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for clue_sqlaloader 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.