Socket
Socket
Sign inDemoInstall

pylocalstorage

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pylocalstorage

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


Maintainers
1

Readme

Pylocalstorage

License: MIT PyPI version Tests Custom badge GitHub issues Downloads Downloads Supported versions

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

Version based on the pickle module. The pickle module implements binary protocols for serializing and de-serializing a Python object structure.

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")
>>> import numpy as np
>>> ls.setItem("array", np.zeros((1080, 1920, 3), dtype=np.uint8))
>>> for i in range(ls.length):
...     print(ls.key(i))
...
'address'
'age'
'array'
>>> ls.clear()
>>> ls.length
0

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc