Flatpages based on files with yaml syntax
Project description
Install
pip install yamlpage
Usage
>>> from yamlpage import YamlPage >>> p = YamlPage('./content')
Put page
>>> url = '/my/url' >>> p.put(url, ( ... ('title', 'foo'), ... ('body', 'foo\nbar'), ... ))>>> path = './content/my#url.yml' >>> print open(path).read() title: foo body: |- foo bar <BLANKLINE>
Get page
>>> p.get(url) {'body': 'foo\nbar', 'title': 'foo'}>>> p.get('/not/found/') is None True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yamlpage-0.0.3.tar.gz
(2.7 kB
view hashes)