pytoml


Namepytoml JSON
Version 0.1.21 PyPI version JSON
download
home_pagehttps://github.com/avakar/pytoml
SummaryA parser for TOML-0.4.0
upload_time2019-07-21 17:58:13
maintainer
docs_urlNone
authorMartin Vejnár
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/pytoml.svg)](https://pypi.python.org/pypi/pytoml)
[![Build Status](https://travis-ci.org/avakar/pytoml.svg?branch=master)](https://travis-ci.org/avakar/pytoml)

# Deprecated

The pytoml project is no longer being actively maintained. Consider using the
[toml](https://github.com/uiri/toml) package instead.

# pytoml

This project aims at being a specs-conforming and strict parser and writer for [TOML][1] files.
The library currently supports [version 0.4.0][2] of the specs and runs with Python 2.7+ and 3.5+.

Install:

    pip install pytoml

The interface is the same as for the standard `json` package.

    >>> import pytoml as toml
    >>> toml.loads('a = 1')
    {'a': 1}
    >>> with open('file.toml', 'rb') as fin:
    ...     obj = toml.load(fin)
    >>> obj
    {'a': 1}

The `loads` function accepts either a bytes object
(that gets decoded as UTF-8 with no BOM allowed),
or a unicode object.

Use `dump` or `dumps` to serialize a dict into TOML.

    >>> print toml.dumps(obj)
    a = 1

## tests

To run the tests update the `toml-test` submodule:

    git submodule update --init --recursive

Then run the tests:

    python test/test.py

  [1]: https://github.com/toml-lang/toml
  [2]: https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/avakar/pytoml",
    "name": "pytoml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Martin Vejn\u00e1r",
    "author_email": "vejnar.martin@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f4/ba/98ee2054a2d7b8bebd367d442e089489250b6dc2aee558b000e961467212/pytoml-0.1.21.tar.gz",
    "platform": "",
    "description": "[![PyPI](https://img.shields.io/pypi/v/pytoml.svg)](https://pypi.python.org/pypi/pytoml)\n[![Build Status](https://travis-ci.org/avakar/pytoml.svg?branch=master)](https://travis-ci.org/avakar/pytoml)\n\n# Deprecated\n\nThe pytoml project is no longer being actively maintained. Consider using the\n[toml](https://github.com/uiri/toml) package instead.\n\n# pytoml\n\nThis project aims at being a specs-conforming and strict parser and writer for [TOML][1] files.\nThe library currently supports [version 0.4.0][2] of the specs and runs with Python 2.7+ and 3.5+.\n\nInstall:\n\n    pip install pytoml\n\nThe interface is the same as for the standard `json` package.\n\n    >>> import pytoml as toml\n    >>> toml.loads('a = 1')\n    {'a': 1}\n    >>> with open('file.toml', 'rb') as fin:\n    ...     obj = toml.load(fin)\n    >>> obj\n    {'a': 1}\n\nThe `loads` function accepts either a bytes object\n(that gets decoded as UTF-8 with no BOM allowed),\nor a unicode object.\n\nUse `dump` or `dumps` to serialize a dict into TOML.\n\n    >>> print toml.dumps(obj)\n    a = 1\n\n## tests\n\nTo run the tests update the `toml-test` submodule:\n\n    git submodule update --init --recursive\n\nThen run the tests:\n\n    python test/test.py\n\n  [1]: https://github.com/toml-lang/toml\n  [2]: https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A parser for TOML-0.4.0",
    "version": "0.1.21",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "54b966505dcb628bf2db382a026fcaa1",
                "sha256": "57a21e6347049f73bfb62011ff34cd72774c031b9828cb628a752225136dfc33"
            },
            "downloads": -1,
            "filename": "pytoml-0.1.21-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "54b966505dcb628bf2db382a026fcaa1",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 8537,
            "upload_time": "2019-07-21T17:58:12",
            "upload_time_iso_8601": "2019-07-21T17:58:12.186188Z",
            "url": "https://files.pythonhosted.org/packages/a5/47/c7f8a0f210ad18576840922e0b504f0b7f5f73aea4a52ab14c5b58517edf/pytoml-0.1.21-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "e59dd36a559dd2a876e4c149c69e947b",
                "sha256": "8eecf7c8d0adcff3b375b09fe403407aa9b645c499e5ab8cac670ac4a35f61e7"
            },
            "downloads": -1,
            "filename": "pytoml-0.1.21.tar.gz",
            "has_sig": false,
            "md5_digest": "e59dd36a559dd2a876e4c149c69e947b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8783,
            "upload_time": "2019-07-21T17:58:13",
            "upload_time_iso_8601": "2019-07-21T17:58:13.306950Z",
            "url": "https://files.pythonhosted.org/packages/f4/ba/98ee2054a2d7b8bebd367d442e089489250b6dc2aee558b000e961467212/pytoml-0.1.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-07-21 17:58:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "avakar",
    "github_project": "pytoml",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "pytoml"
}
        
Elapsed time: 0.03719s