My first inclination would be to base it on CombinatorialFreeModule: if you know a basis, this is a good way to go. It will take care of addition and scalar multiplication, so you'll have to write a bracket method. If you're feeling ambitious, you could write something for the Sage categories framework, implementing "Lie algebras with basis", by imitating "algebras with basis" (sage/categories/algebras_with_basis.py). Then for any particular example, you should just have to define a method "bracket_on_basis" which takes a pair of basis elements and computes their bracket; the category framework (which you will set up separately) will then define a "bracket" method for dealing with arbitrary elements of your Lie algebra.
I used the existing framework for Hopf algebras for the current implementation (as of prerelease versions of Sage 4.7.1) of the Steenrod algebra -- see <
http://trac.sagemath.org/sage_trac/ticket/10052>. I basically only had to define products, antipodes, and coproducts on basis elements, and the framework took care of everything else. (Note, by the way, that the Steenrod algebra is infinite-dimensional, and this is not a problem for working with CombinatorialFreeModules.)
--
John