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

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.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

cobalt-0.1.2-py2-none-any.whl (13.9 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for cobalt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ff5d29277f03c8d3102efeef53de35043aeaa8c52f59a114c5ba8359a7fe1669
MD5 f3a6163709879af02299596aef0e49a1
BLAKE2b-256 72ae61698c29afaa5cbbb8192ef22c2ee5292f20c65584f5e96ddbfbab12a8e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobalt-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 cbc6268b9c1d320676dd3c5d80558aa6689b20e35d1f70dd5e8cac4287edbced
MD5 3acc94e8f21587177581c40a39fb3304
BLAKE2b-256 c8d43d2a504c95f5aa09e9e3bc9012e9eaaa4599ceb0a0a508f8f7daf285c454

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