/pyhavamal

A simple library for accessing the Hávamál, a collection of Old Norse poems translated into English.

Primary LanguagePythonMIT LicenseMIT

PyHavamal

The Hávamál is an Old Norse poem in which each stanza is a saying. The topics range from proper feast decorum to dealing with sorcerers. PyHavamal provides easy access to the text of a translation by Henry Adams Bellows.

Installation

Use pip install pyhavamal.

Use

There are 165 stanzas in the Bellows translation numbered 1-165.

  • all() returns a list of all stanzas. Pass numbered=True to return a dict of numbered stanzas.
  • find_by_number(n) returns stanza n (where n is the stanza number and not zero-based).
  • random() returns a random stanza.
  • range_by_number(a, b) returns a list of stanzas from a to b inclusive (where a and b are stanza numbers and not zero-based).

License

MIT License