Metadata-Version: 2.1
Name: pylocalstorage
Version: 1.0.0
Summary: A package to store data on hard disk (HD) and make it available to all Python applications running in parallel!
Home-page: https://github.com/ferreirad08/pylocalstorage
Author: David Ferreira
Author-email: ferreirad08@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8.6
Description-Content-Type: text/markdown
License-File: LICENSE

# pylocalstorage

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ferreirad08/pylocalstorage/blob/main/LICENSE)
[![PyPI version](https://badge.fury.io/py/pylocalstorage.svg)](https://badge.fury.io/py/pylocalstorage)

A package to store data on hard disk (HD) and make it available to all Python applications running in parallel!

## Requirements
* `python 3`

## Installation

Simply install pylocalstorage package from [PyPI](https://pypi.org/project/pylocalstorage/)

    pip install pylocalstorage

## Examples

    from pylocalstorage import LocalStorage

    # Conectando ao LocalStorage
    my_storage = LocalStorage()

    # Criando trÃªs itens
    my_storage.setItem("name", "David")
    my_storage.setItem("country", "Brazil")
    my_storage.setItem("city", "Manaus")
    print(my_storage.length)

    # Atualizando um item
    my_storage.setItem("name", "David Ferreira")

    # Obtendo um item
    print(my_storage.getItem("name"))

    # Removendo um item
    my_storage.removeItem("city")
    print(my_storage.getItem("city"))

    # Recuperando todas as chaves existentes
    for i in range(my_storage.length):
        print(my_storage.key(i))

    # Limpando o LocalStorage
    my_storage.clear()
    print(my_storage.length)


