jsonomy


Namejsonomy JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/lewis-morris/jsonomy
SummaryBasic JSON parser, that converts APIs JSON output to be more pythonic, including camel case to snake case conversion, and converting timestamps to datetime objects.
upload_time2023-08-10 08:59:57
maintainer
docs_urlNone
authorLewis Morris
requires_python>=3.6
licenseMIT
keywords json parser pythonic camelcase snakecase datetime conversion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Copy code
# Jsonomy

Jsonomy is a basic JSON parser that converts API's JSON output to be more Pythonic. It includes functionalities like converting camel case to snake case, and timestamps to datetime objects.

## Features

- Convert JSON keys from camel case to snake case.
- Identify strings that represent dates and convert them to datetime objects.
- Recursively process JSON data structures.

## Installation

To install Jsonomy, you can use pip:

```bash
pip install jsonomy
```

## Usage

```python  
from jsonomy import Jsonomy

data = {
    "createdAt": "2022-07-01T10:00:00Z",
    "someNestedData": {
        "moreDetails": "data"
    },
    "aList": ["item1", "item2"]
}

# load data into Jsonomy and process
formatter = Jsonomy(data)
processed = formatter.format()

# print the processed data 
formatter.pprint()

# reload new data
formatter.load(data)

#load and format
Jsonomy(data).format()

#load and pretty print to a string
pretty_json = Jsonomy(data).pprint(as_str=True)

```


## License
This project is licensed under the terms of the MIT license.

## Contact
For questions, feel free to reach out to Lewis Morris at lewis.morris@gmail.com

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lewis-morris/jsonomy",
    "name": "jsonomy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "json parser pythonic camelcase snakecase datetime conversion",
    "author": "Lewis Morris",
    "author_email": "lewis.morris@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "Copy code\n# Jsonomy\n\nJsonomy is a basic JSON parser that converts API's JSON output to be more Pythonic. It includes functionalities like converting camel case to snake case, and timestamps to datetime objects.\n\n## Features\n\n- Convert JSON keys from camel case to snake case.\n- Identify strings that represent dates and convert them to datetime objects.\n- Recursively process JSON data structures.\n\n## Installation\n\nTo install Jsonomy, you can use pip:\n\n```bash\npip install jsonomy\n```\n\n## Usage\n\n```python  \nfrom jsonomy import Jsonomy\n\ndata = {\n    \"createdAt\": \"2022-07-01T10:00:00Z\",\n    \"someNestedData\": {\n        \"moreDetails\": \"data\"\n    },\n    \"aList\": [\"item1\", \"item2\"]\n}\n\n# load data into Jsonomy and process\nformatter = Jsonomy(data)\nprocessed = formatter.format()\n\n# print the processed data \nformatter.pprint()\n\n# reload new data\nformatter.load(data)\n\n#load and format\nJsonomy(data).format()\n\n#load and pretty print to a string\npretty_json = Jsonomy(data).pprint(as_str=True)\n\n```\n\n\n## License\nThis project is licensed under the terms of the MIT license.\n\n## Contact\nFor questions, feel free to reach out to Lewis Morris at lewis.morris@gmail.com\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Basic JSON parser, that converts APIs JSON output to be more pythonic, including camel case to snake case conversion, and converting timestamps to datetime objects.",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/lewis-morris/jsonomy"
    },
    "split_keywords": [
        "json",
        "parser",
        "pythonic",
        "camelcase",
        "snakecase",
        "datetime",
        "conversion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98b29b70439b9d99f7d0160e8dbaa80d88d22b628637c4db0c4fd2371b940f7b",
                "md5": "1d4f40250e19b0df68025b5df13a0343",
                "sha256": "a4eafde60e1605ea1af04ffd58a90df228a946e01a4327379e8122323071629e"
            },
            "downloads": -1,
            "filename": "jsonomy-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d4f40250e19b0df68025b5df13a0343",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3988,
            "upload_time": "2023-08-10T08:59:57",
            "upload_time_iso_8601": "2023-08-10T08:59:57.183755Z",
            "url": "https://files.pythonhosted.org/packages/98/b2/9b70439b9d99f7d0160e8dbaa80d88d22b628637c4db0c4fd2371b940f7b/jsonomy-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-10 08:59:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lewis-morris",
    "github_project": "jsonomy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "jsonomy"
}
        
Elapsed time: 0.25126s