Skip to main content

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 python -m unittest
  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/.

Release files for cobalt 9.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cobalt 9.0.1
File Size Uploaded
cobalt-9.0.1.tar.gz 83.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cobalt 9.0.1
File Interpreter ABI Platform
cobalt-9.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 156.8 kB

Release files / cobalt-9.0.1.tar.gz

Download URL cobalt-9.0.1.tar.gz
Size 83.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3a1581f611d9dace7dee35f288e5f3891066a9dd1f5f0881532289fc37f89ea5
BLAKE2b-256 checksum
How to use checksums
95e08ba0deca45a1b9985d9dab0be36d55687f438ea8eea3f0a23e00bae3853d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 9, 2024.

Transparency log

Release files / cobalt-9.0.1-py3-none-any.whl

Download URL cobalt-9.0.1-py3-none-any.whl
Size 73.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8339d0edcc470381ce0fc62daa8bd419f7cc731ffd83fcf57a7c6cf0b526e640
BLAKE2b-256 checksum
How to use checksums
1583d5be80b572064329066b8738e91f6b8dd42712007ae0c13e5e8911cdb1b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 9, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

9.0.1 This release

2 release files

9.0.0

2 release files

8.0.1

2 release files

8.0.0

2 release files

7.0.0

2 release files

6.1.0

2 release files

6.0.0

1 release file

5.0.0

1 release file

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.1

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page