Version 5 (modified by 9 years ago) ( diff ) | ,
---|
SQLAlchemy
SqlAlchemy is an object-oriented database API for Python. From the website:
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language.
Status
- Instructions for using SQLAlchemy as a plugin are listed at th:SqlAlchemyQueryMacro.
- We talked a bit about adopting it for Trac's DB abstraction layer, eventually replacing our home grown db layer.
- A proposal has been worked on: trac-dev:228
- Some experimental work has started in source:sandbox/Attic/sqlalchemy-ng.
SQLAlchemy installation script
An installation consists of the following steps:
- Download and install Python egg SqlAlchemyQuery.
- Set some variables and formatting rules:
TRAC_PATH_REPLACE="my-trac-environment" USER="myuser" MAX_ROW_COUNT_REPLACE="1000" TABLE_BORDER_REPLACE="border=\"1\""
- Copy the sorttable javascript to htdocs:
cp sorttable.js /home/$USER/$TRAC_PATH_REPLACE/htdocs
- Apply the settings in macro.py:
sed -i "s/TRAC_PATH_REPLACE/$TRAC_PATH_REPLACE/g" macro.py sed -i "s/MAX_ROW_COUNT_REPLACE/$MAX_ROW_COUNT_REPLACE/g" macro.py sed -i "s/TABLE_BORDER_REPLACE/$TABLE_BORDER_REPLACE/g" macro.py
- Unzip the egg and copy it to the plugins area:
cp SqlAlchemyQuery-0.1-py2.7.egg /home/$USER/$TRAC_PATH_REPLACE/plugins mv SqlAlchemyQuery-0.1-py2.7.egg ../dist
- Reboot tracd.
Note:
See TracWiki
for help on using the wiki.