A package to store data on the hard disk (HD) and make it available to all Python applications running locally!
Project description
Pylocalstorage
A package to store data on the hard disk (HD) and make it available to all Python applications running locally!
Installation
Simply install pylocalstorage package from PyPI
$ pip install pylocalstorage
Examples
>>> from pylocalstorage import LocalStorage
>>> ls = LocalStorage()
>>> ls.setItem("name", "David")
>>> ls.setItem("age", 29)
>>> ls.setItem("address", {"country": "Brazil", "city": "Manaus"})
>>> ls.length
3
>>> ls.setItem("name", "David Ferreira")
>>> ls.getItem("name")
'David Ferreira'
>>> ls.removeItem("name")
>>> for i in range(ls.length):
... print(ls.key(i))
...
'age'
'address'
>>> ls.clear()
>>> ls.length
0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylocalstorage-1.2.0.tar.gz
(4.0 kB
view hashes)