hytato


Namehytato JSON
Version 0.3 PyPI version JSON
download
home_pagehttps://github.com/Hypurrnating/potato
SummaryModule for storing python dictionaries in a different format.
upload_time2023-07-22 15:27:48
maintainer
docs_urlNone
authorHypurrnating
requires_python>=3.2
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hytato
Module for storing python dictionaries in a different format.
Supported down to python 3.3.

### why?
cause why not?

Needed a way to store data in a way that fit *my* needs, and so decided to create potato(lib).
Potato works with dictionaries. You could use json for that but as I said, needed something for *my* needs.

### Potato types
There are two different kinds of potato files: HTATO and STATO.

HTATO or hard potato have a fixed number of keys.
STATO or soft potato don't have a fixed number of keys.

There are a number of other differences which will be made clearer in the future.
One difference being that STATO files are inherently different. The HTATO files are really just `.txt`, whereas STATO are zip files.
This means you can store a "tree" of data, and also version history

### Usage
HTATO example:

```
from hytato import POTATO

#Add the path of the potato file in HTATO class, which will have either the .htato or .stato file extension.
config_potato = POTATO.HTATO('.\\config.htato')

#if it doesn't exist yet, create the potato file
#add the list of keys you want
config_potato.PLANT(['token', 'passcode', 'fatherless'])

#when the potato has been planted, the values to the keys will all be none, so now add the data

config_potato.INJECT({'token': 112233, 'passcode': 'gugugaga', 'fatherless': True})

#if it succeeded, it won't raise an error lol
#but you can also assign it to a variable beforehand
#and then check from the class returned
#i.e:

injection = config_potato.INJECT({'token': 112233, 'passcode': 'gugugaga', 'fatherless': True})
if injection.complete == True:
    print('yipee')

#to access the data from potato, use the stain method:
config = config_potato.STAIN()
#and just use the dictionary it returns
token = config.get('token')
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Hypurrnating/potato",
    "name": "hytato",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.2",
    "maintainer_email": "",
    "keywords": "",
    "author": "Hypurrnating",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9f/9a/66682c2e8ab331cdd1e6c4cdc06defe0c6bafcb6f006b0a3172b89a578c4/hytato-0.3.tar.gz",
    "platform": null,
    "description": "# hytato\nModule for storing python dictionaries in a different format.\nSupported down to python 3.3.\n\n### why?\ncause why not?\n\nNeeded a way to store data in a way that fit *my* needs, and so decided to create potato(lib).\nPotato works with dictionaries. You could use json for that but as I said, needed something for *my* needs.\n\n### Potato types\nThere are two different kinds of potato files: HTATO and STATO.\n\nHTATO or hard potato have a fixed number of keys.\nSTATO or soft potato don't have a fixed number of keys.\n\nThere are a number of other differences which will be made clearer in the future.\nOne difference being that STATO files are inherently different. The HTATO files are really just `.txt`, whereas STATO are zip files.\nThis means you can store a \"tree\" of data, and also version history\n\n### Usage\nHTATO example:\n\n```\nfrom hytato import POTATO\n\n#Add the path of the potato file in HTATO class, which will have either the .htato or .stato file extension.\nconfig_potato = POTATO.HTATO('.\\\\config.htato')\n\n#if it doesn't exist yet, create the potato file\n#add the list of keys you want\nconfig_potato.PLANT(['token', 'passcode', 'fatherless'])\n\n#when the potato has been planted, the values to the keys will all be none, so now add the data\n\nconfig_potato.INJECT({'token': 112233, 'passcode': 'gugugaga', 'fatherless': True})\n\n#if it succeeded, it won't raise an error lol\n#but you can also assign it to a variable beforehand\n#and then check from the class returned\n#i.e:\n\ninjection = config_potato.INJECT({'token': 112233, 'passcode': 'gugugaga', 'fatherless': True})\nif injection.complete == True:\n    print('yipee')\n\n#to access the data from potato, use the stain method:\nconfig = config_potato.STAIN()\n#and just use the dictionary it returns\ntoken = config.get('token')\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Module for storing python dictionaries in a different format.",
    "version": "0.3",
    "project_urls": {
        "Homepage": "https://github.com/Hypurrnating/potato"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a5d050aefd9a5c52f550049ac39cc8c3bad4ef030fe4a8144ce9a45ea808446",
                "md5": "941872110a1290781aa3917c13b8ab0d",
                "sha256": "3def8e3a1e2a5ff6bed825bae0e79a2d3290c5e2c031dc46f3dd0ae37ab1143c"
            },
            "downloads": -1,
            "filename": "hytato-0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "941872110a1290781aa3917c13b8ab0d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.2",
            "size": 7093,
            "upload_time": "2023-07-22T15:27:47",
            "upload_time_iso_8601": "2023-07-22T15:27:47.352693Z",
            "url": "https://files.pythonhosted.org/packages/7a/5d/050aefd9a5c52f550049ac39cc8c3bad4ef030fe4a8144ce9a45ea808446/hytato-0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f9a66682c2e8ab331cdd1e6c4cdc06defe0c6bafcb6f006b0a3172b89a578c4",
                "md5": "723529ae153ed02b86bbf68faac90058",
                "sha256": "762c04104f02dad25220196daad980e1d2bf7580fb2be1e3619440a728540185"
            },
            "downloads": -1,
            "filename": "hytato-0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "723529ae153ed02b86bbf68faac90058",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.2",
            "size": 6774,
            "upload_time": "2023-07-22T15:27:48",
            "upload_time_iso_8601": "2023-07-22T15:27:48.638508Z",
            "url": "https://files.pythonhosted.org/packages/9f/9a/66682c2e8ab331cdd1e6c4cdc06defe0c6bafcb6f006b0a3172b89a578c4/hytato-0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-22 15:27:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hypurrnating",
    "github_project": "potato",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hytato"
}
        
Elapsed time: 0.09079s