Skip to main content

A lightweight library for working with Akoma Ntoso Act documents

Project description

https://badge.fury.io/py/cobalt.svg https://travis-ci.org/Code4SA/cobalt.svg

Cobalt is a lightweight Python library for working with Akoma Ntoso Act documents. It makes it easy to work with Akoma Ntoso metadata, FRBR URIs and generate Tables of Contents for a document.

It is lightweight because most operations are done on the XML document directly without intermediate objects. You still need to understand how Akoma Ntoso works.

Read the full documentation at cobalt.readthedocs.org.

Quickstart

Install using:

$ pip install cobalt

Use it like this:

>>> from cobalt import Act
>>> act = Act()
>>> act.title = "Act 10 of 1980"
>>> act.frbr_uri = "/za/act/1980/10"
>>> act.year
'1980'
>>> act.number
'10'
>>> print act.to_xml()
[ lots of xml ]

Contributing

  1. Clone the repo

  2. Install development dependencies:

    pip install -e .[dev]
  3. Make your changes

  4. Run tests:

    nosetests && flake8
  5. Send a pull request

Releasing a New Version

  1. Run the testes! nosetests

  2. Update VERSION appropriately

  3. Update the Change Log section in README.rst

  4. Commit and push to github

  5. Release to PyPI:

    python setup.py sdist bdist_wheel upload

Change Log

0.1.5

  • FIX use schedule FRBRalias as heading

0.1.4

  • Transforming XML to HTML now includes all attributes as data- attributes

0.1.3

  • Refactor TOC helpers into own file

  • Fix .format in FrbrUri

0.1.1

  • first release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cobalt-0.1.5.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

cobalt-0.1.5-py2-none-any.whl (16.0 kB view details)

Uploaded Python 2

File details

Details for the file cobalt-0.1.5.tar.gz.

File metadata

  • Download URL: cobalt-0.1.5.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cobalt-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cd8f2da4196b384a31c731ef5913596ead6d97c9dadb26309002c66cd30440b8
MD5 59cfb100ef2172bb3f7cce6aae44a38d
BLAKE2b-256 c3336a42b256bfd116e1a7ae0f63278dd644f72de85a5d52660c1da873b1a16c

See more details on using hashes here.

File details

Details for the file cobalt-0.1.5-py2-none-any.whl.

File metadata

File hashes

Hashes for cobalt-0.1.5-py2-none-any.whl
Algorithm Hash digest
SHA256 d4d00e40c439c44005e48478dd5287061ecf34a32ca3f89fec6dda1a4cd12b3c
MD5 4357d7df9e890a5d02266029b37f514b
BLAKE2b-256 2fe96a56bd9c0b1fb75013f67e6978452c10e827b21d40618d8f48c80f6dbf06

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page