Garth's test of PyDS 29.4.2003

2003-04-29

Metakit Weirdness

If you perform a getas with no properties defined, the view's structure will be empty. Define even one [valid] property in the view, and you'll get all the properties when you call structure . If the property wasn't valid, of course, you'll end up defining it. Oops.
>>> import metakit
>>> db = metakit.storage('weblog.data',0)
>>> vw = db.getas('posts')
>>> len(vw)
0
>>> vw.structure()
[]
>>> vw = db.getas('posts[id:S]')
>>> len(vw)
24
>>> vw.structure()
[Property('S', 'id'), 
 Property('S', 'title'), 
 Property('S', 'link'), 
 Property('S', 'source'),
 Property('S', 'sourceurl'), 
 Property('S', 'text'), 
 Property('S', 'rendered'), 
 Property('I', 'onhome'), 
 Property('I', 'structured'), 
 Property('S', 'pubdate'), 
 Property('F', 'pubtime'), 
 Property('V', 'categories')]
>>> 

I'm thinking PyDS might need some kind of lightweight schema manager to mediate between tools and their databases. My main driver for this is so that tools can safely access each others' data. Specifically, so that I can write a RadioMigrationTool. It'll want to add categories, add posts, and maintian its own preferences so you can do things like suck the data down again if necessary.

Another concern is adding properties. If I want to keep track of Radio's post ID, so I can keep the permalinks intact, how would I do that? There's a lot to ponder, here.

posted at 17:49:20    #    comment []    trackback []
 

Packet scanning and manipulation via Python

Fresh from the PyPI feed (RSS): Scapy 0.9.12beta, a Python-interfaced packet scanning and manipulation package. Most impressive to me is that the command line interface is the Python interpreter, making some very powerful transformations quite simple...
posted at 09:12:00    #    comment []    trackback []
April 2003
MoTuWeThFrSaSu
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
282930    
Mar
2003
 May
2004

Garth is testing PyDS rather more extensively than at first he thought he would.

XML-Image Letterimage

© 2003-2004, Garth T Kidd