Skip to main content

A lightweight library for working with Akoma Ntoso Act documents

Project description

Cobalt

image

image

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

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.io.

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-05-03/10"
>>> act.frbr_uri.year
'1980'
>>> act.frbr_uri.date
'1980-05-03'
>>> act.frbr_uri.number
'10'
>>> act.frbr_uri.doctype
'act'
>>> 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 cobalt
    
  5. Send a pull request

Releasing a new version

  1. Run the tests with nosetests
  2. Update the version by changing the __version__ variable in cobalt/__init__.py
  3. Commit your changes and push to the master branch on GitHub
  4. Create a release in GitHub and it will automatically be pushed to PyPi

License

Cobalt is licensed under the LPGL 3.0 license.

Copyright 2015-2020 AfricanLII.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

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

Uploaded Source

Built Distribution

cobalt-8.0.1-py3-none-any.whl (73.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cobalt-8.0.1.tar.gz
  • Upload date:
  • Size: 83.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cobalt-8.0.1.tar.gz
Algorithm Hash digest
SHA256 ac3f7c174d7c32c84d1421cf4990da556b840dd9466fe29e51aa51f0b4ed34de
MD5 0132fe3ca814b47562fff47dedfffd0b
BLAKE2b-256 a970b3d00313f31cb812b539c516a6ef1e980422e54c0ed08c045d8bca4dfed7

See more details on using hashes here.

File details

Details for the file cobalt-8.0.1-py3-none-any.whl.

File metadata

  • Download URL: cobalt-8.0.1-py3-none-any.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cobalt-8.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea3c1766e9b12d19d388d84c1c6dc327bd916506909efc0da25cf52d5504d21
MD5 42b3275f360f7cebc108afb46dd52c5a
BLAKE2b-256 4b9119363770c6d0dc86eb1d42b8923ff19afea55855aa9c198239c00528beb7

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