A lightweight library for working with Akoma Ntoso Act documents
Project description
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
Clone the repo
Install development dependencies:
pip install -e .[dev]
Make your changes
Run tests:
nosetests && flake8
Send a pull request
Change Log
0.1.3
Refactor TOC helpers into own file
Fix .format in FrbrUri
0.1.1
first release
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
Built Distribution
File details
Details for the file cobalt-0.1.3.tar.gz
.
File metadata
- Download URL: cobalt-0.1.3.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 212f182888386c1c054cceaff3e9e6034077c83147c823ea7805c2edbec01aa2 |
|
MD5 | 15481bb7c9209bbeb0ce1bdcfd49c4bf |
|
BLAKE2b-256 | e8fb20b5ad2f3673640bd5f2748cdcf88c94f9a49da059639e81fa8a5f4bfde9 |
File details
Details for the file cobalt-0.1.3-py2-none-any.whl
.
File metadata
- Download URL: cobalt-0.1.3-py2-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea962dc757ef5bbbcf5d41079be492627feda7b183c915e92bb27770a355732b |
|
MD5 | 80e54f9680d35f0dfdc13ed9da3c9695 |
|
BLAKE2b-256 | 8b2fbc9b39a9c27dbe220d10e11bd5c041b42a4dc32f42c8fa3cc24f48718140 |