{"id":32643932,"url":"https://github.com/dotemacs/pantry","last_synced_at":"2025-10-31T03:59:21.228Z","repository":{"id":312345564,"uuid":"1047205132","full_name":"dotemacs/pantry","owner":"dotemacs","description":"Common Lisp client for https://getpantry.cloud","archived":false,"fork":false,"pushed_at":"2025-09-29T09:01:43.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-18T12:39:51.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotemacs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T23:25:55.000Z","updated_at":"2025-09-29T09:01:46.000Z","dependencies_parsed_at":"2025-08-30T01:18:26.821Z","dependency_job_id":"67e6fdcf-31d7-4185-bac3-776dcae51410","html_url":"https://github.com/dotemacs/pantry","commit_stats":null,"previous_names":["dotemacs/pantry"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dotemacs/pantry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotemacs%2Fpantry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotemacs%2Fpantry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotemacs%2Fpantry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotemacs%2Fpantry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotemacs","download_url":"https://codeload.github.com/dotemacs/pantry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotemacs%2Fpantry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281925779,"owners_count":26584821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-31T03:58:13.031Z","updated_at":"2025-10-31T03:59:21.222Z","avatar_url":"https://github.com/dotemacs.png","language":"Common Lisp","readme":"# `pantry`\n\n[![Ultralisp](https://ultralisp.org/projects/dotemacs/pantry.svg)](https://ultralisp.org/projects/dotemacs/pantry)\n\nA Common Lisp client library for the [Pantry JSON storage\nservice](https://getpantry.cloud).\n\n## Usage\n\nPantry, stores JSON data in objects which it calls `baskets`.\n\nYou can store JSON data in them like so:\n\n```lisp\nCL-USER\u003e (pantry:create-basket *client* \"user-settings\"\n                      '((\"theme\" . \"dark\")\n                        (\"language\" . \"en\")\n                        (\"notifications\" . t)\n                        (\"user-id\" . 12345)))\n\"Your Pantry was updated with basket: user-settings!\"\n```\n\nOr get the data out:\n\n```lisp\n(pantry:get-basket *client* \"user-settings\")\n;; =\u003e a hash-table\n```\n\nYou can also update your basket:\n\n```lisp\n(pantry:update-basket *client* \"user-settings\"\n                      '((\"theme\" . \"light\")\n                        (\"last-login\" . \"2023-12-01\")))\n;; =\u003e merged basket contents as a hash-table\n```\nwhich merges your existing data with the new data.\n\nOr you can delete it:\n\n```lisp\n(pantry:delete-basket *client* \"user-settings\")\n;; Returns: \"user-settings was removed from your Pantry!\"\n```\n\nThe place where all these baskets sit within Pantry, the service, is\ncalled pantry, the object, which you can look up:\n\n```lisp\n(pantry:get-pantry-details *client*)\n```\n\nTo make it easier to work with data, You can pass many Common Lisp\ndata structures and they’ll be converted to JSON automatically. Basket\npayloads must be JSON objects and you pass a non-object (like a list\nor vector), it is wrapped as {\"value\": ...}  to satisfy the API.\n\n\n## Installation\n\n### 1. Install Dependencies\n\n```lisp\n(ql:quickload '(:dexador :com.inuoe.jzon))\n```\n\n### 2. Load the Library\n\n**Option A: Using ASDF (recommended)**\n```lisp\n;; Add the pantry directory to ASDF's search path\n(push #P\"/path/to/pantry/\" asdf:*central-registry*)\n\n;; Load the system\n(asdf:load-system :pantry)\n```\n\n**Option B: Manual loading**\n```lisp\n;; Single-file system: just load pantry.lisp\n(load \"/path/to/pantry/pantry.lisp\")\n```\n\n### 3. Get Your Pantry ID\n\nVisit [getpantry.cloud](https://getpantry.cloud) to get your free pantry ID.\n\n## Usage\n\n### Creating a Client\n\n```lisp\n(defparameter *client* (pantry:make-pantry-client \"your-pantry-id-here\"))\n```\n\n### Pantry Operations\n\n#### Get Pantry Details\nGet information about your pantry, including available baskets:\n\n```lisp\n(pantry:get-pantry-details *client*)\n;; =\u003e a hash-table mapping string keys to values\n;; Example access:\n(let ((details (pantry:get-pantry-details *client*)))\n  (gethash \"baskets\" details))\n```\n\n### Data structures that you can use\n\n#### Hash-table\n```lisp\n(let ((ht (make-hash-table :test 'equal)))\n  (setf (gethash :theme ht) :dark\n        (gethash \"language\" ht) \"en\"\n        (gethash 'notifications ht) t)\n  (pantry:create-basket *client* \"ht-basket\" ht))\n```\n\n#### Plist -\u003e JSON object\n```lisp\n(pantry:create-basket *client* \"plist-basket\"\n                      '(:theme :dark :language \"en\" :notifications t))\n```\n\n#### Vector / list wrapped under \"value\"\n```lisp\n(pantry:create-basket *client* \"array-basket\" #(1 2 3 4))\n;; Sends {\"value\": [1,2,3,4]}\n\n(pantry:create-basket *client* \"list-basket\"  '(:a :b :c))\n;; Sends {\"value\": [\"a\",\"b\",\"c\"]}\n```\n\n#### Dotted pair -\u003e single-entry object\n```lisp\n(pantry:create-basket *client* \"pair-basket\"  '(foo . 42))\n```\n\n#### Nested structures are fine too\n\n```lisp\n(pantry:create-basket *client* \"nested\"\n  '((user . ((id . 1) (name . \"Ada\")))\n    (prefs . (:theme :dark :langs #(\"en\" \"fr\")))))\n```\n\n\n## Error Handling\n\nThe library defines custom conditions for error handling:\n\n```lisp\n;; Catch all pantry errors\n(handler-case\n    (pantry:get-basket *client* \"non-existent-basket\")\n  (pantry:pantry-error (e)\n    (format t \"Error: ~A~%\" (pantry:pantry-error-message e))))\n\n;; Catch HTTP-specific errors\n(handler-case\n    (pantry:create-basket *client* \"test\" invalid-data)\n  (pantry:pantry-http-error (e)\n    (format t \"HTTP ~A: ~A~%\"\n            (pantry:pantry-http-error-status-code e)\n            (pantry:pantry-error-message e))))\n```\n\n## API Reference\n\n- `pantry-client` - Main client structure containing pantry-id and base-url\n\n### Functions\n\n- `make-pantry-client (pantry-id)` - Create a new client instance\n- `get-pantry-details (client)` - Get pantry information\n- `update-pantry-details (client \u0026key name description)` - Update pantry metadata\n- `create-basket (client basket-name data)` - Create or replace a basket\n- `get-basket (client basket-name)` - Get basket contents\n- `update-basket (client basket-name data)` - Update basket (merge)\n- `delete-basket (client basket-name)` - Delete a basket\n\n## License\n\nBSD License\n","funding_links":[],"categories":["Expert Systems"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotemacs%2Fpantry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotemacs%2Fpantry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotemacs%2Fpantry/lists"}