Skip to content

Python virtualenv for Windows, configured with ORM libraries for testing: sqlalchemy, peewee, sqlobject, and pony.

Notifications You must be signed in to change notification settings

coventryuniversity/python-sql-libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python ORM Libraries Environment

Maintainer: Colin Stephen

NOTE: This environment is configured for Windows only. If you use Linux / OSX then come and speak to Colin during support hours or during a class for guidance.

About

This repository contains a full Python virtualenv configured with a number of ORM libraries for testing/development. For a quick comparison of their APIs and links to specific documentation, see Part 3 of the Python SQLAlchemy Tutorial.

The libraries included here are:

  • SQLObject
  • SQLAlchemy
  • Peewee
  • PonyORM

Usage

  1. Load up the SourceTree git client
  2. Open the "Terminal" command line in SourceTree
  3. cd in to your project directory (use pwd to show the current directory, ls to list current files, and cd .. to move up a level)
  4. Clone this repository into your project directory using git clone https://github.com/coventryuniversity/python-sql-libs.git venv
    • If it worked, you will now have a venv folder inside your project directory
  5. Close SourceTree

You can now run any of your Python files from the command line (load it with cmd from the Windows Start menu) using the command venv\Scripts\python.exe <filename.py> from inside your project directory (use cd to change directories, dir to list current files, cd .. to move up a level, and E: to change to drive E, etc.)

  • Your Python file(s) will be able to use the ORM libraries included
  • Just import them as normal with import sqlalchemy or from sqlalchemy import Column, Integer, String etc...

IDLE and Other Editors

If you want to be able to use the libraries included here, then you need to run your Python scripts from the command line as described above. It will not work if you try to run the script from within IDLE or another editor. So, edit your files in IDLE or another editor, but run the file from the command line as above.

About

Python virtualenv for Windows, configured with ORM libraries for testing: sqlalchemy, peewee, sqlobject, and pony.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published