cobalt


Namecobalt JSON
Version 8.0.1 PyPI version JSON
download
home_page
SummaryA lightweight library for working with Akoma Ntoso Act documents
upload_time2024-01-04 14:53:36
maintainer
docs_urlNone
author
requires_python>=3.7
licenseLGPLv3+
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # Cobalt

![image](https://laws.africa/img/icons/cobalt.png)

[![image](https://badge.fury.io/py/cobalt.svg)](http://badge.fury.io/py/cobalt)

Cobalt is a lightweight Python library for working with [Akoma Ntoso](http://www.akomantoso.org/) 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](http://cobalt.readthedocs.io/en/latest/).

## 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`](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/>.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cobalt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "\"Laws.Africa\" <info@laws.africa>",
    "download_url": "https://files.pythonhosted.org/packages/a9/70/b3d00313f31cb812b539c516a6ef1e980422e54c0ed08c045d8bca4dfed7/cobalt-8.0.1.tar.gz",
    "platform": null,
    "description": "# Cobalt\n\n![image](https://laws.africa/img/icons/cobalt.png)\n\n[![image](https://badge.fury.io/py/cobalt.svg)](http://badge.fury.io/py/cobalt)\n\nCobalt is a lightweight Python library for working with [Akoma Ntoso](http://www.akomantoso.org/) documents. It makes it\neasy to work with Akoma Ntoso documents, metadata and FRBR URIs.\n\nIt is lightweight because most operations are done on the XML document directly without intermediate objects. You still\nneed to understand how Akoma Ntoso works.\n\nRead the [full documentation at cobalt.readthedocs.io](http://cobalt.readthedocs.io/en/latest/).\n\n## Quickstart\n\nInstall using:\n\n    $ pip install cobalt\n\nUse it like this:\n\n    >>> from cobalt import Act\n    >>> act = Act()\n    >>> act.title = \"Act 10 of 1980\"\n    >>> act.frbr_uri = \"/za/act/1980-05-03/10\"\n    >>> act.frbr_uri.year\n    '1980'\n    >>> act.frbr_uri.date\n    '1980-05-03'\n    >>> act.frbr_uri.number\n    '10'\n    >>> act.frbr_uri.doctype\n    'act'\n    >>> print act.to_xml()\n    [ lots of xml ]\n\n## Contributing\n\n1.  Clone the repo\n2.  Install development dependencies:\n\n        pip install -e .[dev]\n\n3.  Make your changes\n4.  Run tests:\n\n        nosetests && flake8 cobalt\n\n5.  Send a pull request\n\n## Releasing a new version\n\n1. Run the tests with `nosetests`\n2. Update the version by changing the `__version__` variable in [`cobalt/__init__.py`](cobalt/__init__.py)\n3. Commit your changes and push to the master branch on GitHub\n4. Create a release in GitHub and it will automatically be pushed to PyPi\n\n# License\n\nCobalt is licensed under the LPGL 3.0 license.\n\nCopyright 2015-2020 AfricanLII.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see <https://www.gnu.org/licenses/>.\n",
    "bugtrack_url": null,
    "license": "LGPLv3+",
    "summary": "A lightweight library for working with Akoma Ntoso Act documents",
    "version": "8.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/laws-africa/cobalt/issues",
        "Homepage": "https://github.com/laws-africa/cobalt"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b9119363770c6d0dc86eb1d42b8923ff19afea55855aa9c198239c00528beb7",
                "md5": "42b3275f360f7cebc108afb46dd52c5a",
                "sha256": "6ea3c1766e9b12d19d388d84c1c6dc327bd916506909efc0da25cf52d5504d21"
            },
            "downloads": -1,
            "filename": "cobalt-8.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42b3275f360f7cebc108afb46dd52c5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 73323,
            "upload_time": "2024-01-04T14:53:34",
            "upload_time_iso_8601": "2024-01-04T14:53:34.559397Z",
            "url": "https://files.pythonhosted.org/packages/4b/91/19363770c6d0dc86eb1d42b8923ff19afea55855aa9c198239c00528beb7/cobalt-8.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a970b3d00313f31cb812b539c516a6ef1e980422e54c0ed08c045d8bca4dfed7",
                "md5": "0132fe3ca814b47562fff47dedfffd0b",
                "sha256": "ac3f7c174d7c32c84d1421cf4990da556b840dd9466fe29e51aa51f0b4ed34de"
            },
            "downloads": -1,
            "filename": "cobalt-8.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0132fe3ca814b47562fff47dedfffd0b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 83376,
            "upload_time": "2024-01-04T14:53:36",
            "upload_time_iso_8601": "2024-01-04T14:53:36.995292Z",
            "url": "https://files.pythonhosted.org/packages/a9/70/b3d00313f31cb812b539c516a6ef1e980422e54c0ed08c045d8bca4dfed7/cobalt-8.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 14:53:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "laws-africa",
    "github_project": "cobalt",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cobalt"
}
        
Elapsed time: 0.16440s