Skip to main content

A lightweight library for working with Akoma Ntoso Act documents

Project description

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.

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

Change Log

  • 0.1.0 - 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.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

cobalt-0.1.0-py2-none-any.whl (11.5 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for cobalt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 111aee8fbb52a344f4811feee8202503e27345f8cdd8b18573b6666cd603b7e7
MD5 69109a00f82477b2b56bcddd5204feab
BLAKE2b-256 209f6f4fc266b97b3045f4986a7247d626abba26a71264bef31485e2cf95cee3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobalt-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 bed9858860a1806b1dcca7db719a5839382c12683ac27ca164afdf06b3277846
MD5 fbd1a038d54e48a1e40d73004e6d3055
BLAKE2b-256 d43b2c9a487f2bf0b5f9f4b0d6fa1d74ab26f8d44b3c05d432fd322a86c37d8f

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