The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Post To Meilisearch With The Python SDK

TODO: Pull subtitle into page object

This is how I'm sending updates to Meilisearch via Python with authenciation via values stored in the default Keycain Access mac app and the python keyring library. (keyring works on other operating systems as well if you're not on a mac)

code_start_default_section code_end_default_section

#+RESULTS: : { : "enqueuedAt": "2022-05-24T22:02:19.643685Z", : "indexUid": "test-6", : "status": "enqueued", : "type": "documentAddition", : "uid": 10171 : }

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Post To Meilisearch With The Python SDK

-- p

This is how I'm sending updates to Meilisearch via
Python with authenciation via values stored in
the default Keycain Access mac app and the python
keyring library. (keyring works on other operating
systems as well if you're not on a mac)

-- code/
-- python

import json
  import keyring
  import meilisearch


  domain = "http://localhost:7700"
  admin_key = keyring.get_password(
      'alan--meilisearch--scratchpad--admin-key',
      'alan'
  )

  client = meilisearch.Client(
      domain,
      admin_key
  )

  documents = [
      { "id": "file-1", "content": "this is file one" },
      { "id": "file-2", "content": "second file here" },
      { "id": "file-3", "content": "take three" }
  ]

  response = client.index('test-6').add_documents(documents)

  print(json.dumps(response, sort_keys=True, indent=2, default=str))

-- /code

-- p

#+RESULTS:
: {
:   "enqueuedAt": "2022-05-24T22:02:19.643685Z",
:   "indexUid": "test-6",
:   "status": "enqueued",
:   "type": "documentAddition",
:   "uid": 10171
: }


-- categories
-- Meilisearch
-- Python

-- metadata
-- date: 2022-05-24 16:37:20
-- id: 29culmje
-- status: published
-- type: post
-- SCRUBBED_NEO: false
-- site: aws