{"id":12779,"date":"2022-02-15T11:06:46","date_gmt":"2022-02-15T19:06:46","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=12779"},"modified":"2025-06-13T21:25:08","modified_gmt":"2025-06-14T04:25:08","slug":"monitor-stellar-assets-using-couchbase-python","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/","title":{"rendered":"Monitor Stellar Assets using Couchbase &#038; Python"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">This post describes how to build a basic client that records activity on the <\/span><a href=\"https:\/\/stellar.org\"><span style=\"font-weight: 400;\">Stellar Decentralized Blockchain<\/span><\/a><span style=\"font-weight: 400;\">. Stellar hosts a growing list of new and different cryptocurrency alt-coins and tokens. With the code from this post you can create a basic query tool of assets held in a Stellar account, using Couchbase for storage and query.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">What you&#8217;ll need<\/span><\/h4>\n<h5><span style=\"font-weight: 400;\">Couchbase<\/span><\/h5>\n<p><span style=\"font-weight: 400;\">To follow along, set up a recent version of Couchbase that is equal to or higher than 7.0.2. You can do most things with earlier versions but in future posts, you won&#8217;t be able to access the built-in charting, scopes, or collections. <\/span><a href=\"https:\/\/cloud.couchbase.com\"><span style=\"font-weight: 400;\">Couchbase Capella<\/span><\/a><span style=\"font-weight: 400;\"> database-as-a-service is available as well with a simple free trial, or you can install an on-prem or <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/install\/getting-started-docker.html\"><span style=\"font-weight: 400;\">Docker version of Couchbase<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Using the built-in Couchbase Admin UI &#8211; choose the <\/span><b>Bucket <\/b><span style=\"font-weight: 400;\">menu in the sidebar and the <\/span><b>Add Bucket <\/b><span style=\"font-weight: 400;\">button (top right).\u00a0 Create a bucket called <\/span><span style=\"font-weight: 400;\">stellar<\/span><span style=\"font-weight: 400;\">, as shown in Figure 1. It needs minimal memory assigned to it, mine defaults to 300MB which will be more than enough.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12780\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.11.04-AM.png\" alt=\"Add a new data bucket to the Couchbase cluster\" width=\"1248\" height=\"695\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.11.04-AM.png 1248w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.11.04-AM-300x167.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.11.04-AM-1024x570.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.11.04-AM-768x428.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.11.04-AM-20x11.png 20w\" sizes=\"auto, (max-width: 1248px) 100vw, 1248px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Figure 1. Add a new data bucket to the Couchbase cluster.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It will take a minute to warm up before it turns green to show it is available, shown in\u00a0 Figure 2.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12781\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.12.26-AM.png\" alt=\" The new bucket is now available\" width=\"1183\" height=\"282\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.12.26-AM.png 1183w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.12.26-AM-300x72.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.12.26-AM-1024x244.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.12.26-AM-768x183.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.12.26-AM-20x5.png 20w\" sizes=\"auto, (max-width: 1183px) 100vw, 1183px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Figure 2. The new bucket is now available.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Stellar Wallet Address<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Next you&#8217;ll need a Stellar wallet address to monitor. To find an interesting account, use <\/span><a href=\"https:\/\/stellar.expert\/directory?tag[]=wallet\"><span style=\"font-weight: 400;\">Stellar.expert and its account browser<\/span><\/a><span style=\"font-weight: 400;\"> to find a wallet ID.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For my experiments, I&#8217;m using this address as it has a small but interesting collection of tokens:\u00a0<\/span><\/p>\n<pre class=\"\">GAF55XSX3WCHWUB6CEGSKKMLPKV56Y5MK4UCBRSSGRBBDENFEXSWWMDQ<\/pre>\n<h4><span style=\"font-weight: 400;\">Python SDK<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Next we&#8217;ll use Python 3 and the Couchbase Python SDK. Install the Python SDK using the <\/span><span style=\"font-weight: 400;\">pip <\/span><span style=\"font-weight: 400;\">command as described in the <\/span><a href=\"https:\/\/docs.couchbase.com\/python-sdk\/current\/hello-world\/start-using-sdk.html\"><span style=\"font-weight: 400;\">documentation<\/span><\/a><span style=\"font-weight: 400;\">. Also include the <\/span><span style=\"font-weight: 400;\">requests <\/span><span style=\"font-weight: 400;\">package that we&#8217;ll need for downloading from the Stellar web API.<\/span><\/p>\n<pre class=\"\">python3 -m pip install --upgrade pip setuptools wheel<\/pre>\n<p><span style=\"font-weight: 400;\">Test the installation by launching Python and importing the Couchbase module:<\/span><\/p>\n<pre class=\"decode-attributes:false lang:default decode:true\">tyler@megaserv:python-stellar$ python3\r\nPython 3.8.10 (default, Nov 26 2021, 20:14:08)\r\n[GCC 9.3.0] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt; import couchbase<\/pre>\n<p><span style=\"font-weight: 400;\">If it completes with no errors, then we are good to go. Press <\/span><em><span style=\"font-weight: 400;\">CTRL+D<\/span><\/em><span style=\"font-weight: 400;\"> to quit.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Connecting to Couchbase<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">The <\/span><a href=\"https:\/\/docs.couchbase.com\/python-sdk\/current\/hello-world\/start-using-sdk.html#hello-couchbase\"><span style=\"font-weight: 400;\">Hello Couchbase<\/span><\/a><span style=\"font-weight: 400;\"> examples in the documentation show the basic connection information you need to add to our Python script. At a minimum, to connect to our new bucket we need:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The administrator username\/password (or one with access rights to the new bucket)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The name\/IP of the Couchbase server\/cluster<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The name of the new bucket (e.g., <\/span><em><span style=\"font-weight: 400;\">stellar<\/span><span style=\"font-weight: 400;\">)<\/span><\/em><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Create a script called <\/span><em><span style=\"font-weight: 400;\">app.py<\/span><\/em><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"decode-attributes:false lang:python decode:true \">from couchbase.cluster import Cluster, ClusterOptions\r\nfrom couchbase.auth import PasswordAuthenticator\r\n\r\ncluster = Cluster('couchbase:\/\/localhost', ClusterOptions(\r\nPasswordAuthenticator('Administrator', 'Administrator')))\r\n\r\ncb = cluster.bucket('stellar')<\/pre>\n<p><span style=\"font-weight: 400;\">You can run the script and see if you get any errors before continuing.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Reviewing Stellar.org accounts schema<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">For this project, we will download account information directly from the <\/span><b>Stellar web API<\/b><span style=\"font-weight: 400;\"> and store the raw JSON data in Couchbase for querying later.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To access a Stellar account we will use their Horizon service and hit their <\/span><em><span style=\"font-weight: 400;\">\/public\/asset<\/span><\/em><span style=\"font-weight: 400;\"><em> endpoint<\/em>. For example, I use <\/span><a href=\"https:\/\/postman.co\"><span style=\"font-weight: 400;\">Postman.co<\/span><\/a><span style=\"font-weight: 400;\"> to do a quick view of the resulting JSON to get a feel for the schema, as shown in Figure 3.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12782\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.15.40-AM.png\" alt=\" Sample of the Stellar accounts JSON document\" width=\"742\" height=\"843\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.15.40-AM.png 742w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.15.40-AM-264x300.png 264w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.15.40-AM-300x341.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.15.40-AM-18x20.png 18w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Figure 3. Sample of the Stellar accounts JSON document.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the figure, note that I&#8217;ve collapsed a few objects and lists to see things more clearly. The root level elements, such as <\/span><em><span style=\"font-weight: 400;\">account_id<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"> subentry_count<\/span><\/em><span style=\"font-weight: 400;\">, and<\/span><em><span style=\"font-weight: 400;\"> last_modified_time<\/span><\/em><span style=\"font-weight: 400;\"> are potentially useful. But most of the entries are in the <\/span><em><span style=\"font-weight: 400;\">balances<\/span><\/em><span style=\"font-weight: 400;\"> object, almost 1700 lines in fact.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">These are the meat and potatoes of the asset holder, let&#8217;s look at them a bit deeper in Figure 4 below.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12783\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.17.10-AM.png\" alt=\"Two entries from the balances list\" width=\"531\" height=\"289\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.17.10-AM.png 531w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.17.10-AM-300x163.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.17.10-AM-20x11.png 20w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Figure 4. Two entries from the balances list.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the above figure there are two types of balances shown. There are dozens of others that are not being shown, but they are all similar to the first one shown here. It lists a balance of the number of tokens (<\/span><em><span style=\"font-weight: 400;\">1.7<\/span><\/em><span style=\"font-weight: 400;\">), the asset_code (<\/span><em><span style=\"font-weight: 400;\">ZDC<\/span><\/em><span style=\"font-weight: 400;\"> are <\/span><a href=\"https:\/\/www.zodiactokens.org\/\"><span style=\"font-weight: 400;\">Zodiac Tokens<\/span><\/a><span style=\"font-weight: 400;\">), and the<\/span><em><span style=\"font-weight: 400;\"> asset_issuer<\/span><\/em><span style=\"font-weight: 400;\"> address (since many accounts can issue the same asset). Note also the <\/span><em><span style=\"font-weight: 400;\">asset_type<\/span><\/em><span style=\"font-weight: 400;\"> (<\/span><em><span style=\"font-weight: 400;\">credit_alphanum4<\/span><\/em><span style=\"font-weight: 400;\">).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The second entry above is the only different<\/span><em><span style=\"font-weight: 400;\"> asset_type<\/span><\/em><span style=\"font-weight: 400;\"> in the list (<\/span><em><span style=\"font-weight: 400;\">native<\/span><\/em><span style=\"font-weight: 400;\">). In this case, it&#8217;s an account level base balance, the owner&#8217;s Lobstr wallet native token, in this case <\/span><a href=\"https:\/\/medium.com\/stellar-global\/xlm-he-token-of-the-future-84548b890eb2\"><span style=\"font-weight: 400;\">Stellar Lumens<\/span><\/a><span style=\"font-weight: 400;\"> (<\/span><em><span style=\"font-weight: 400;\">XLM<\/span><\/em><span style=\"font-weight: 400;\">). This balance can be swapped with balances of any other asset and vice versa through the asset trading account.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Planning our workflow<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">With the above in mind we can plan for how to store and access all the information we are interested in. So, what are we interested in?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">First, we are interested in a daily update of statistics about the account. So, assume we&#8217;ll run our script daily and update the information in the database.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Current balances will be good to know &#8211; including the native XLM amount and the other token balances. As long as we retain these details in the documents we store, we will be able to query them at any time. We will also have to make sure our key is a sort of timestamp or incrementing ID so that our documents are not overwritten by newer entries.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We could also do some intermediate calculations to keep another document up to date with base totals, etc. but we&#8217;ll leave that to a future post.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The next two steps to take are to download this JSON document and then upload it to Couchbase. We&#8217;ll then look at the result in the Web Console UI and test out the queries and charts.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Downloading Stellar accounts data with Python<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">This is, admittedly, a very simple example that we can build on over the upcoming weeks.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To access a web API we use the Python requests module and store the results in a JSON object.<\/span><\/p>\n<pre class=\"\">import requests\r\n\r\nurl = \"https:\/\/horizon.stellar.org\/accounts\/GAF55XSX3WCHWUB6CEGSKKMLPKV56Y5MK4UCBRSSGRBBDENFEXSWWMDQ\/\"\r\n\r\nresponse = requests.request(\"GET\", url)\r\njsondoc = response.json()\r\n\r\n#for key, value in jsondoc.items():\r\n# print(key, \":\", value)<\/pre>\n<p><span style=\"font-weight: 400;\">I include a simple loop example to show you how easy it is if you want to see it printed out in a very ugly form. There are prettier printing techniques but we&#8217;ll use the ones built into Couchbase to make it easier instead of writing more code here.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Sending JSON document to Couchbase<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Next we use our Couchbase bucket object and do an upsert call. <\/span><em><span style=\"font-weight: 400;\">Upsert<\/span><\/em><span style=\"font-weight: 400;\"> is the same as a document or database insert statement, but will update any existing document if it already exists. In our case, we also want to generate a unique ID and use it for our document ID.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let&#8217;s add a unix timestamp using the <\/span><span style=\"font-weight: 400;\">time<\/span><span style=\"font-weight: 400;\"> module and build a key, as shown in the Python SDK getting started guide, which also includes some basic exception capturing.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Putting it all together<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Now let&#8217;s step back and look at the consolidated code example built with various functions to help compartmentalize everything and make it a little more reusable.<\/span><\/p>\n<pre class=\"\">import requests, time\r\nfrom couchbase.cluster import Cluster, ClusterOptions\r\nfrom couchbase.auth import PasswordAuthenticator\r\n\r\naccount = 'GAF55XSX3WCHWUB6CEGSKKMLPKV56Y5MK4UCBRSSGRBBDENFEXSWWMDQ'\r\n\r\ndef connect():\r\ncluster = Cluster('couchbase:\/\/localhost', ClusterOptions(PasswordAuthenticator('Administrator', 'Administrator')))\r\nreturn cluster.bucket('stellar')\r\n\r\ndef getjson():\r\nurl = \"https:\/\/horizon.stellar.org\/accounts\/%s\/\" % account\r\nprint(\"Fetching: \" + url)\r\nresponse = requests.request(\"GET\", url)\r\nreturn response.json()\r\n\r\ndef upsert_document(connection, doc):\r\nnow = int( time.time() )\r\ntry:\r\nkey = str(now) + \"_\" + account[:5]\r\nresult = connection.upsert(key, doc)\r\nprint(result)\r\nexcept Exception as e:\r\nprint(\"Error\",e)\r\n\r\ncb = connect()\r\njson = getjson()\r\nupsert_document(cb, json)<\/pre>\n<p><span style=\"font-weight: 400;\">The result will list the web API URL that was used and show either an error or the <\/span><em><span style=\"font-weight: 400;\">OperationResult<\/span><\/em><span style=\"font-weight: 400;\"> details:<\/span><\/p>\n<pre class=\"decode-attributes:false lang:default decode:true\">$ python app.py\r\n\r\nFetching: https:\/\/horizon.stellar.org\/accounts\/GAF55XSX3WCHWUB6CEGSKKMLPKV56Y5MK4UCBRSSGRBBDENFEXSWWMDQ\/\r\nOperationResult&lt;rc=0x0, key='1644906573_GAF55', cas=0x16d3e1d051760000, tracing_context=0, tracing_output=None&gt;<\/pre>\n<h4><span style=\"font-weight: 400;\">Looking at token results in the web console<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">After running the script a few times you should have a few documents in the project bucket now. When you have selected the <\/span><em><span style=\"font-weight: 400;\">stellar<\/span><\/em><span style=\"font-weight: 400;\"> bucket, press the <\/span><b>Documents <\/b><span style=\"font-weight: 400;\">button (top right) to see a list of documents that you can interact with, one result is shown in Figure 5.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12784\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM.png\" alt=\"Sample Stellar account document open in Couchbase web console\" width=\"797\" height=\"803\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM.png 797w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-298x300.png 298w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-150x150.png 150w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-768x774.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-65x65.png 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-50x50.png 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-300x302.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.22.08-AM-20x20.png 20w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Figure 5. Sample Stellar account document open in Couchbase web console.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To enable querying we need to build a few indexes. Switch to the <\/span><b>Query <\/b><span style=\"font-weight: 400;\">tab and enter these <\/span><a href=\"https:\/\/docs.couchbase.com\/files\/Couchbase-N1QL-CheatSheet.pdf\"><span style=\"font-weight: 400;\">N1QL<\/span><\/a><span style=\"font-weight: 400;\"> query statements to get a few indexes set up. Note, we are using a default collection of documents, so we prefix the bucket name to denote that. (In a future post we&#8217;ll segregate our documents for different purposes and use collections to do so.)<\/span><\/p>\n<pre class=\"\">create primary index on default:stellar;\r\ncreate index idx_account_id on default:stellar(id);\r\ncreate index idx_modified on default:stellar(last_modified_time);\r\ncreate index idx_entrycount on stellar(subentry_count);<\/pre>\n<p><span style=\"font-weight: 400;\">For each of the different assets:<\/span><\/p>\n<pre class=\"\">create index idx_asset_code on stellar(balances.asset_code);\r\ncreate index idx_asset_type on stellar(balances.asset_type);\r\ncreate index idx_asset_issuer on stellar(balances.asset_issuer);\r\ncreate index idx_asset_balance on stellar(balances.balance);<\/pre>\n<p><span style=\"font-weight: 400;\">Then test the index with a basic query:<\/span><\/p>\n<pre class=\"decode-attributes:false lang:default decode:true \">select count(*) from stellar;<\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><b>Results <\/b><span style=\"font-weight: 400;\">window should show a basic output with the number of documents in the bucket, in this case, <\/span><span style=\"font-weight: 400;\">7<\/span><span style=\"font-weight: 400;\"> documents as shown in Figure 6.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12785\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.23.00-AM.png\" alt=\"Sample query to count the documents in the bucket\" width=\"287\" height=\"307\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.23.00-AM.png 287w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.23.00-AM-280x300.png 280w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.23.00-AM-20x20.png 20w\" sizes=\"auto, (max-width: 287px) 100vw, 287px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Figure 6. Sample query to count the documents in the bucket.<\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Querying attributes in a set of JSON documents<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">You can build queries easily as N1QL is very similar to standard SQL but with JSON intelligence built-in. There are functions that allow us to access entries in the <\/span><span style=\"font-weight: 400;\"><em>balances<\/em> <\/span><span style=\"font-weight: 400;\">list object as if they were each columns. Using <\/span><em><span style=\"font-weight: 400;\">UNNEST<\/span><\/em><span style=\"font-weight: 400;\"><em>,<\/em> each of the sub-entries becomes an accessible field name in the query.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example, the following query lists all the assets and balances:<\/span><\/p>\n<pre class=\"\">SELECT balances.balance AS balance, \r\n       balances.asset_code \r\nFROM stellar UNNEST balances<\/pre>\n<p><span style=\"font-weight: 400;\">The query window shows the results in JSON by default, but you can switch it to the Table option and see our results so far:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12786\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-15-at-10.24.14-AM.png\" alt=\"Table Option View\" width=\"516\" height=\"534\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.24.14-AM.png 516w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.24.14-AM-290x300.png 290w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.24.14-AM-300x310.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/Screen-Shot-2022-02-15-at-10.24.14-AM-20x20.png 20w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/p>\n<h4><span style=\"font-weight: 400;\">Next steps<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">In our next post, we&#8217;ll dive deeper and build some charts and use some more querying magic.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here are some additional links to read up on the topics we discussed:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/docs.couchbase.com\/python-sdk\/current\/hello-world\/start-using-sdk.html\"><span style=\"font-weight: 400;\">Start using the Couchbase Python SDK<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/docs.couchbase.com\/files\/Couchbase-N1QL-CheatSheet.pdf\"><span style=\"font-weight: 400;\">Couchbase N1QL checksheet (PDF)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/stellar.org\/\"><span style=\"font-weight: 400;\">Stellar decentralized exchange (stellar.org)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.stellar.org\/learn\/blockchain-basics\"><span style=\"font-weight: 400;\">Blockchain basics<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/developers.stellar.org\/api\/resources\/accounts\/object\/\"><span style=\"font-weight: 400;\">Stellar developer API docs (accounts)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/medium.com\/stellar-global\/xlm-he-token-of-the-future-84548b890eb2\"><span style=\"font-weight: 400;\">Stellar Lumens &#8211; XLM &#8211; the token of the future<\/span><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain. Stellar hosts a growing list of new and different cryptocurrency alt-coins and tokens. With the code from this post you can create a [&hellip;]<\/p>\n","protected":false},"author":75185,"featured_media":12787,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[2225,9139,2201],"tags":[8388,1519,9520],"ppma_author":[9163],"class_list":["post-12779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-python","category-tools-sdks","tag-blockchain","tag-docker","tag-stellar"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Monitor Stellar Assets using Couchbase &amp; Python - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Monitor Stellar Assets using Couchbase &amp; Python\" \/>\n<meta property=\"og:description\" content=\"This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-15T19:06:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T04:25:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1707\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tyler Mitchell - Senior Product Marketing Manager\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@1tylermitchell\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tyler Mitchell - Senior Product Marketing Manager\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\"},\"author\":{\"name\":\"Tyler Mitchell - Senior Product Marketing Manager\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/684cc0e5c60cd2e4b591db9621494ed0\"},\"headline\":\"Monitor Stellar Assets using Couchbase &#038; Python\",\"datePublished\":\"2022-02-15T19:06:46+00:00\",\"dateModified\":\"2025-06-14T04:25:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\"},\"wordCount\":1459,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg\",\"keywords\":[\"blockchain\",\"docker\",\"stellar\"],\"articleSection\":[\"Couchbase Capella\",\"Python\",\"Tools &amp; SDKs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\",\"name\":\"Monitor Stellar Assets using Couchbase & Python - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg\",\"datePublished\":\"2022-02-15T19:06:46+00:00\",\"dateModified\":\"2025-06-14T04:25:08+00:00\",\"description\":\"This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg\",\"width\":2560,\"height\":1707},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitor Stellar Assets using Couchbase &#038; Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/684cc0e5c60cd2e4b591db9621494ed0\",\"name\":\"Tyler Mitchell - Senior Product Marketing Manager\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/d8a7c532bf2b94b7a2fe7a8439aafd75\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ebec3213e756f2e1f7118fcb5722e2cd1484c9256ae34ceb8f77054b986f21ce?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ebec3213e756f2e1f7118fcb5722e2cd1484c9256ae34ceb8f77054b986f21ce?s=96&d=mm&r=g\",\"caption\":\"Tyler Mitchell - Senior Product Marketing Manager\"},\"description\":\"Works as Senior Product Marketing Manager at Couchbase, helping bring knowledge about products into the public limelight while also supporting our field teams with valuable content. His personal passion is all things geospatial, having worked in GIS for half his career. Now AI and Vector Search is top of mind.\",\"sameAs\":[\"https:\/\/linkedin.com\/in\/tylermitchell\",\"https:\/\/x.com\/1tylermitchell\",\"https:\/\/www.youtube.com\/channel\/UCBZFuoiTcg0f3lGSQwLjeTg\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/tylermitchell\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Monitor Stellar Assets using Couchbase & Python - The Couchbase Blog","description":"This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/","og_locale":"en_US","og_type":"article","og_title":"Monitor Stellar Assets using Couchbase & Python","og_description":"This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain.","og_url":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/","og_site_name":"The Couchbase Blog","article_published_time":"2022-02-15T19:06:46+00:00","article_modified_time":"2025-06-14T04:25:08+00:00","og_image":[{"width":2560,"height":1707,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg","type":"image\/jpeg"}],"author":"Tyler Mitchell - Senior Product Marketing Manager","twitter_card":"summary_large_image","twitter_creator":"@1tylermitchell","twitter_misc":{"Written by":"Tyler Mitchell - Senior Product Marketing Manager","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/"},"author":{"name":"Tyler Mitchell - Senior Product Marketing Manager","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/684cc0e5c60cd2e4b591db9621494ed0"},"headline":"Monitor Stellar Assets using Couchbase &#038; Python","datePublished":"2022-02-15T19:06:46+00:00","dateModified":"2025-06-14T04:25:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/"},"wordCount":1459,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg","keywords":["blockchain","docker","stellar"],"articleSection":["Couchbase Capella","Python","Tools &amp; SDKs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/","url":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/","name":"Monitor Stellar Assets using Couchbase & Python - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg","datePublished":"2022-02-15T19:06:46+00:00","dateModified":"2025-06-14T04:25:08+00:00","description":"This post describes how to build a basic client that records activity on the Stellar Decentralized Blockchain.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/02\/christin-hume-mfB1B1s4sMc-unsplash-scaled.jpg","width":2560,"height":1707},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/monitor-stellar-assets-using-couchbase-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Monitor Stellar Assets using Couchbase &#038; Python"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/684cc0e5c60cd2e4b591db9621494ed0","name":"Tyler Mitchell - Senior Product Marketing Manager","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/d8a7c532bf2b94b7a2fe7a8439aafd75","url":"https:\/\/secure.gravatar.com\/avatar\/ebec3213e756f2e1f7118fcb5722e2cd1484c9256ae34ceb8f77054b986f21ce?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ebec3213e756f2e1f7118fcb5722e2cd1484c9256ae34ceb8f77054b986f21ce?s=96&d=mm&r=g","caption":"Tyler Mitchell - Senior Product Marketing Manager"},"description":"Works as Senior Product Marketing Manager at Couchbase, helping bring knowledge about products into the public limelight while also supporting our field teams with valuable content. His personal passion is all things geospatial, having worked in GIS for half his career. Now AI and Vector Search is top of mind.","sameAs":["https:\/\/linkedin.com\/in\/tylermitchell","https:\/\/x.com\/1tylermitchell","https:\/\/www.youtube.com\/channel\/UCBZFuoiTcg0f3lGSQwLjeTg"],"url":"https:\/\/www.couchbase.com\/blog\/author\/tylermitchell\/"}]}},"authors":[{"term_id":9163,"user_id":75185,"is_guest":0,"slug":"tylermitchell","display_name":"Tyler Mitchell - Senior Product Marketing Manager","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/876da1e4284f1832c871b3514caf7867357744b8c0a370ef6f53a79dee2f379e?s=96&d=mm&r=g","author_category":"","last_name":"Mitchell - Senior Product Marketing Manager","first_name":"Tyler","job_title":"Senior Product Marketing Manager","user_url":"","description":"Works as Senior Product Marketing Manager at Couchbase, helping bring knowledge about products into the public limelight while also supporting our field teams with valuable content. His personal passion is all things geospatial, having worked in GIS for half his career. Now AI and Vector Search is top of mind."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/12779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/75185"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=12779"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/12779\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/12787"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=12779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=12779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=12779"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=12779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}