Skip to main content

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

Project description

Pylocalstorage

License: MIT PyPI version Tests Custom badge Downloads

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

Requirements

  • Python 2.7, 3.6 or higher

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


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.1.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file pylocalstorage-1.1.1.tar.gz.

File metadata

  • Download URL: pylocalstorage-1.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pylocalstorage-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8ab0ad2e6b0ecc0af0c4c0f37d7ad0671bed7ac9e08f503c5aa8a79d14c9d59d
MD5 594dc126c1d77496f1b73ae768f9589d
BLAKE2b-256 7ebf84e2d2f55e632c5bdf8247a411682e4be9707b9f201b5825d17eb5412182

See more details on using hashes here.

Supported by

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