Skip to main content

Module for storing python dictionaries in a different format.

Project description

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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hytato-0.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

hytato-0.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file hytato-0.3.tar.gz.

File metadata

  • Download URL: hytato-0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for hytato-0.3.tar.gz
Algorithm Hash digest
SHA256 762c04104f02dad25220196daad980e1d2bf7580fb2be1e3619440a728540185
MD5 723529ae153ed02b86bbf68faac90058
BLAKE2b-256 9f9a66682c2e8ab331cdd1e6c4cdc06defe0c6bafcb6f006b0a3172b89a578c4

See more details on using hashes here.

File details

Details for the file hytato-0.3-py3-none-any.whl.

File metadata

  • Download URL: hytato-0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for hytato-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3def8e3a1e2a5ff6bed825bae0e79a2d3290c5e2c031dc46f3dd0ae37ab1143c
MD5 941872110a1290781aa3917c13b8ab0d
BLAKE2b-256 7a5d050aefd9a5c52f550049ac39cc8c3bad4ef030fe4a8144ce9a45ea808446

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page