{"library":"pickleshare","code":"import os\nfrom pickleshare import PickleShareDB\n\n# Create a database in a temporary directory\ndb_path = './my_pickleshare_db'\nos.makedirs(db_path, exist_ok=True)\ndb = PickleShareDB(db_path)\n\n# Store some data\ndb['greeting'] = 'Hello, PickleShare!'\ndb['data/list'] = [1, 2, 3]\ndb['data/nested/value'] = {'a': 1, 'b': 2}\n\n# Retrieve data\nprint(f\"Greeting: {db['greeting']}\")\nprint(f\"List: {db['data/list']}\")\n\n# Check keys\nprint(f\"All keys: {list(db.keys())}\")\n\n# Update data\ndb['greeting'] = 'Hello again!'\n\n# Delete data\ndel db['data/list']\n\n# Clean up the database directory (optional)\ndb.clear() # Clears all data within the db directory\nos.rmdir(db_path) # Removes the empty directory","lang":"python","description":"This quickstart demonstrates how to initialize a PickleShareDB, store and retrieve various data types (including nested keys), list keys, update values, and delete entries. It also includes cleanup steps for the database directory.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}