{ "cells": [ { "cell_type": "markdown", "id": "cell-00", "metadata": {}, "source": [ "# Python API Example - Intraday Arb Analytics\n", "\n", "Here we import the Intraday Arb Analytics data from the Spark Intraday Arbs Python API:\n", "- __Arb Components__: the four components behind each Intraday Arb, returned by the existing Arbs endpoints\n", "- __Tradable Products__: the contracts behind each arb month (TTF, JKM-TTF, NWE-TTF basis and the Spark25 or Spark30 freight FFA), and their prices\n", "\n", "- The path to your client credentials is the only input needed to run this script (just before Section 2)\n", "- This script has been designed to display the raw outputs of requests from the API, and then shows you how to format those outputs to enable easy reading and analysis\n", "\n", "__N.B. This guide is just for Intraday Arb Analytics data. If you're looking for other API data products (such as contract prices, Freight routes or Netbacks), please refer to their according code example files.__\n", "\n", "### Have any questions?\n", "\n", "If you have any questions regarding our API, or need help accessing specific datasets, please contact us at:\n", "\n", "__data@sparkcommodities.com__\n", "\n", "or refer to our API website for more information about this endpoint: https://www.sparkcommodities.com/api/intraday/arbs.html" ] }, { "cell_type": "markdown", "id": "cell-01", "metadata": {}, "source": [ "## 1. Importing Data\n", "\n", "Here we define the functions that allow us to retrieve the valid credentials to access the Spark API.\n", "\n", "This section can remain unchanged for most Spark API users." ] }, { "cell_type": "code", "execution_count": null, "id": "cell-02", "metadata": {}, "outputs": [], "source": [ "import json\n", "import os\n", "import sys\n", "import pandas as pd\n", "import numpy as np\n", "from base64 import b64encode\n", "from pprint import pprint\n", "from urllib.parse import urljoin\n", "import datetime\n", "from io import StringIO\n", "\n", "\n", "try:\n", " from urllib import request, parse\n", " from urllib.error import HTTPError\n", "except ImportError:\n", " raise RuntimeError(\"Python 3 required\")\n", "\n", "\n", "API_BASE_URL = \"https://api.sparkcommodities.com\"\n", "\n", "\n", "def retrieve_credentials(file_path=None):\n", " \"\"\"\n", " Find credentials either by reading the client_credentials file or reading\n", " environment variables\n", " \"\"\"\n", " if file_path is None:\n", " client_id = os.getenv(\"SPARK_CLIENT_ID\")\n", " client_secret = os.getenv(\"SPARK_CLIENT_SECRET\")\n", " if not client_id or not client_secret:\n", " raise RuntimeError(\n", " \"SPARK_CLIENT_ID and SPARK_CLIENT_SECRET environment vars required\"\n", " )\n", " else:\n", " # Parse the file\n", " if not os.path.isfile(file_path):\n", " raise RuntimeError(\"The file {} doesn't exist\".format(file_path))\n", "\n", " with open(file_path) as fp:\n", " lines = [l.replace(\"\\n\", \"\") for l in fp.readlines()]\n", "\n", " if lines[0] in (\"clientId,clientSecret\", \"client_id,client_secret\"):\n", " client_id, client_secret = lines[1].split(\",\")\n", " else:\n", " print(\"First line read: '{}'\".format(lines[0]))\n", " raise RuntimeError(\n", " \"The specified file {} doesn't look like to be a Spark API client \"\n", " \"credentials file\".format(file_path)\n", " )\n", "\n", " print(\">>>> Found credentials!\")\n", " print(\n", " \">>>> Client_id={}, client_secret={}****\".format(client_id, client_secret[:5])\n", " )\n", "\n", " return client_id, client_secret\n", "\n", "\n", "def do_api_post_query(uri, body, headers):\n", " url = urljoin(API_BASE_URL, uri)\n", "\n", " data = json.dumps(body).encode(\"utf-8\")\n", "\n", " # HTTP POST request\n", " req = request.Request(url, data=data, headers=headers)\n", " try:\n", " response = request.urlopen(req)\n", " except HTTPError as e:\n", " print(\"HTTP Error: \", e.code)\n", " print(e.read())\n", " sys.exit(1)\n", "\n", " resp_content = response.read()\n", "\n", " # The server must return HTTP 201. Raise an error if this is not the case\n", " assert response.status == 201, resp_content\n", "\n", " # The server returned a JSON response\n", " content = json.loads(resp_content)\n", "\n", " return content\n", "\n", "\n", "def do_api_get_query(uri, access_token, format='json'):\n", " \"\"\"\n", " After receiving an Access Token, we can request information from the API.\n", " \"\"\"\n", " url = urljoin(API_BASE_URL, uri)\n", "\n", " if format == 'json':\n", " headers = {\n", " \"Authorization\": \"Bearer {}\".format(access_token),\n", " \"Accept\": \"application/json\",\n", " }\n", " elif format == 'csv':\n", " headers = {\n", " \"Authorization\": \"Bearer {}\".format(access_token),\n", " \"Accept\": \"text/csv\"\n", " }\n", " else:\n", " raise ValueError('The format parameter only takes `csv` or `json` as inputs')\n", "\n", " # HTTP GET request\n", " req = request.Request(url, headers=headers)\n", " try:\n", " response = request.urlopen(req)\n", " except HTTPError as e:\n", " print(\"HTTP Error: \", e.code)\n", " print(e.read())\n", " sys.exit(1)\n", "\n", " resp_content = response.read()\n", " #status = response.status\n", "\n", " # The server must return HTTP 200. Raise an error if this is not the case\n", " assert response.status == 200, resp_content\n", "\n", " # Storing response based on requested format\n", " if format == 'json':\n", " content = json.loads(resp_content)\n", " elif format == 'csv':\n", " content = resp_content\n", "\n", " return content\n", "\n", "\n", "def get_access_token(client_id, client_secret):\n", " \"\"\"\n", " Get a new access_token. Access tokens are the thing that applications use to make\n", " API requests. Access tokens must be kept confidential in storage.\n", "\n", " # Procedure:\n", "\n", " Do a POST query with `grantType` in the body. A basic authorization\n", " HTTP header is required. The \"Basic\" HTTP authentication scheme is defined in\n", " RFC 7617, which transmits credentials as `clientId:clientSecret` pairs, encoded\n", " using base64.\n", " \"\"\"\n", "\n", " # Note: for the sake of this example, we choose to use the Python urllib from the\n", " # standard lib. One should consider using https://requests.readthedocs.io/\n", "\n", " payload = \"{}:{}\".format(client_id, client_secret).encode()\n", " headers = {\n", " \"Authorization\": \"Basic {}\".format(b64encode(payload).decode()),\n", " \"Accept\": \"application/json\",\n", " \"Content-Type\": \"application/json\",\n", " }\n", " body = {\n", " \"grantType\": \"clientCredentials\",\n", " }\n", "\n", " content = do_api_post_query(uri=\"/oauth/token/\", body=body, headers=headers)\n", "\n", " print(\n", " \">>>> Successfully fetched an access token {}****, valid {} seconds.\".format(\n", " content[\"accessToken\"][:5], content[\"expiresIn\"]\n", " )\n", " )\n", "\n", " return content[\"accessToken\"]" ] }, { "cell_type": "markdown", "id": "cell-03", "metadata": {}, "source": [ "## N.B. Credentials\n", "\n", "Here we call the above functions, and input the file path to our credentials.\n", "\n", "N.B. You must have downloaded your client credentials CSV file before proceeding. Please refer to the API documentation if you have not dowloaded them already. Instructions for downloading your credentials can be found here:\n", "\n", "https://app.sparkcommodities.com/data-integrations/api" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-04", "metadata": {}, "outputs": [], "source": [ "# Insert file path to your client credentials here\n", "client_id, client_secret = retrieve_credentials(file_path=\"/tmp/client_credentials.csv\")\n", "\n", "# Authenticate:\n", "access_token = get_access_token(client_id, client_secret)" ] }, { "cell_type": "markdown", "id": "cell-05", "metadata": {}, "source": [ "## 2. Reference Data\n", "\n", "The Reference Data endpoint returns the UUID codes associated with each FOB Port available on the Arbs endpoints.\n", "\n", "If there are two arbs available for a single FOB Port, e.g. \"Sabine Pass via COGH\" or \"Sabine Pass via Panama\", these are included as separate entries in the Reference Data response. The FOB Port UUID remains the same between these two entries." ] }, { "cell_type": "code", "execution_count": null, "id": "cell-06", "metadata": {}, "outputs": [], "source": [ "# define reference data function\n", "\n", "def fetch_reference_data(access_token, format='json'):\n", "\n", " uri = \"/v1.0/intraday/arbs/reference-data/\"\n", " print(uri)\n", "\n", " content = do_api_get_query(uri, access_token=access_token, format=format)\n", "\n", " if format == 'json':\n", " data = content\n", " elif format == 'csv':\n", " # if there's no data to show, returns an empty DataFrame and \"No Data to Show\" message\n", " if len(content) == 0:\n", " data = pd.DataFrame()\n", " print('No Data to Show')\n", " else:\n", " data = content.decode('utf-8')\n", " data = pd.read_csv(StringIO(data)) # automatically converting into a Pandas DataFrame when choosing CSV format\n", "\n", " return data\n", "\n", "\n", "# call data\n", "ref_df = fetch_reference_data(access_token, format='csv')\n", "ref_df" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-07", "metadata": {}, "outputs": [], "source": [ "# Save your chosen FOB Port UUID as a variable\n", "my_fobport = ref_df[ref_df['FobPortName'] == 'Sabine Pass']['FobPortUuid'].iloc[0]\n", "\n", "print(my_fobport)" ] }, { "cell_type": "markdown", "id": "cell-08", "metadata": {}, "source": [ "## 3. Arb Components\n", "\n", "The Arbs Live, Historical and Revisions endpoints return each arb point with its four components:\n", "- `TtfDeliveryDelta`\n", "- `TtfBasisDelta`\n", "- `FreightCostDelta`\n", "- `VolumeAdjustmentCostDelta`\n", "\n", "The four components sum to the arb `Value` (to within 0.001 from rounding). Here we call the Live endpoint - details on its parameters can be found on the API docs website:\n", "\n", "https://www.sparkcommodities.com/api/intraday/arbs.html\n", "\n", "__N.B__ Metadata is only available via the JSON format." ] }, { "cell_type": "code", "execution_count": null, "id": "cell-09", "metadata": {}, "outputs": [], "source": [ "## Defining the function\n", "\n", "def fetch_live_arbs(access_token, ticker, via, percent_hire, unit, extended_curve, format='json'):\n", "\n", " query_params = \"?fob-port={}\".format(ticker)\n", " if via is not None:\n", " query_params += \"&via-point={}\".format(via)\n", " query_params += \"&unit={}\".format(unit)\n", " query_params += \"&percent-hire={}\".format(percent_hire)\n", " query_params += \"&extended-curve={}\".format(extended_curve)\n", "\n", " uri = \"/v1.0/intraday/arbs/live/{}\".format(query_params)\n", " print(uri)\n", "\n", " content = do_api_get_query(uri=uri, access_token=access_token, format=format)\n", "\n", " if format == 'json':\n", " data = content\n", " elif format == 'csv':\n", " # if there's no data to show, returns an empty DataFrame and \"No Data to Show\" message\n", " if len(content) == 0:\n", " data = pd.DataFrame()\n", " print('No Data to Show')\n", " else:\n", " data = content.decode('utf-8')\n", " data = pd.read_csv(StringIO(data)) # automatically converting into a Pandas DataFrame when choosing CSV format\n", "\n", " return data" ] }, { "cell_type": "markdown", "id": "cell-10", "metadata": {}, "source": [ "#### JSON Response" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-11", "metadata": {}, "outputs": [], "source": [ "# calling the live arbs in JSON format\n", "json_live = fetch_live_arbs(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False, format='json')\n", "\n", "# printing metaData\n", "json_live['metaData']" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-12", "metadata": {}, "outputs": [], "source": [ "json_live['data'][:2]" ] }, { "cell_type": "markdown", "id": "cell-13", "metadata": {}, "source": [ "#### CSV Response" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-14", "metadata": {}, "outputs": [], "source": [ "# calling the live arbs in CSV format\n", "arbs_df = fetch_live_arbs(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False, format='csv')\n", "arbs_df.head(5)" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-15", "metadata": {}, "outputs": [], "source": [ "# arb value and its four components, per arb month\n", "arbs_df[['PeriodName', 'TtfDeliveryDelta', 'TtfBasisDelta', 'FreightCostDelta', 'VolumeAdjustmentCostDelta', 'Value']]" ] }, { "cell_type": "markdown", "id": "cell-16", "metadata": {}, "source": [ "## 4. Tradable Products - Live\n", "\n", "Here we define the function used to call the latest Tradable Products release. For each arb month, this returns the contracts behind the arb and the price of each contract.\n", "\n", "This endpoint takes the same parameters as the Arbs endpoints, plus an optional `arb_period`: any date within the arb month you'd like to retrieve. Leave it as `None` to return all arb months.\n", "\n", "__N.B__ Each row has its own `Unit`: `usd-per-mmbtu` for gas contracts and `usd-per-day` for freight contracts. `percent_hire` is accepted for consistency with the Arbs endpoints, but doesn't change the contracts or prices returned." ] }, { "cell_type": "code", "execution_count": null, "id": "cell-17", "metadata": {}, "outputs": [], "source": [ "## Defining the function\n", "\n", "def fetch_live_tradable_products(access_token, ticker, via, percent_hire, unit, extended_curve, arb_period=None, format='json'):\n", "\n", " query_params = \"?fob-port={}\".format(ticker)\n", " if via is not None:\n", " query_params += \"&via-point={}\".format(via)\n", " query_params += \"&unit={}\".format(unit)\n", " query_params += \"&percent-hire={}\".format(percent_hire)\n", " query_params += \"&extended-curve={}\".format(extended_curve)\n", " if arb_period is not None:\n", " query_params += \"&arb-period={}\".format(arb_period)\n", "\n", " uri = \"/v1.0/intraday/arbs/tradable-products/live/{}\".format(query_params)\n", " print(uri)\n", "\n", " content = do_api_get_query(uri=uri, access_token=access_token, format=format)\n", "\n", " if format == 'json':\n", " data = content\n", " elif format == 'csv':\n", " # if there's no data to show, returns an empty DataFrame and \"No Data to Show\" message\n", " if len(content) == 0:\n", " data = pd.DataFrame()\n", " print('No Data to Show')\n", " else:\n", " data = content.decode('utf-8')\n", " data = pd.read_csv(StringIO(data)) # automatically converting into a Pandas DataFrame when choosing CSV format\n", "\n", " return data" ] }, { "cell_type": "markdown", "id": "cell-18", "metadata": {}, "source": [ "#### JSON Response" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-19", "metadata": {}, "outputs": [], "source": [ "# calling the live tradable products in JSON format\n", "json_tp = fetch_live_tradable_products(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False, format='json')\n", "\n", "# printing metaData\n", "json_tp['metaData']" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-20", "metadata": {}, "outputs": [], "source": [ "json_tp['data'][:2]" ] }, { "cell_type": "markdown", "id": "cell-21", "metadata": {}, "source": [ "#### CSV Response" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-22", "metadata": {}, "outputs": [], "source": [ "# calling the live tradable products in CSV format\n", "tp_df = fetch_live_tradable_products(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False, format='csv')\n", "tp_df.head(10)" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-23", "metadata": {}, "outputs": [], "source": [ "# choosing a single arb month: any date within the month can be used\n", "arb_month = tp_df['ArbPeriodFrom'].iloc[0]\n", "\n", "month_df = fetch_live_tradable_products(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False, arb_period=arb_month, format='csv')\n", "month_df[['ArbPeriodName', 'ProductName', 'ProductContractName', 'ProductContractType', 'Value', 'Unit']]" ] }, { "cell_type": "markdown", "id": "cell-24", "metadata": {}, "source": [ "## 5. Tradable Products - Historical\n", "\n", "Here we define the function used to call historical Tradable Products data. On top of the Live parameters, this endpoint takes a `start` and `end` date - details on these parameters can be found on the API docs website:\n", "\n", "https://www.sparkcommodities.com/api/intraday/arbs.html\n", "\n", "__N.B__ Metadata is only available via the JSON format." ] }, { "cell_type": "code", "execution_count": null, "id": "cell-25", "metadata": {}, "outputs": [], "source": [ "## Defining the function\n", "\n", "def fetch_historical_tradable_products(access_token, ticker, via, percent_hire, unit, extended_curve, start, end, arb_period=None, format='json'):\n", "\n", " query_params = \"?fob-port={}\".format(ticker)\n", " if via is not None:\n", " query_params += \"&via-point={}\".format(via)\n", " query_params += \"&unit={}\".format(unit)\n", " query_params += \"&percent-hire={}\".format(percent_hire)\n", " query_params += \"&extended-curve={}\".format(extended_curve)\n", " query_params += \"&start={}\".format(start)\n", " query_params += \"&end={}\".format(end)\n", " if arb_period is not None:\n", " query_params += \"&arb-period={}\".format(arb_period)\n", "\n", " uri = \"/v1.0/intraday/arbs/tradable-products/historical/{}\".format(query_params)\n", " print(uri)\n", "\n", " content = do_api_get_query(uri=uri, access_token=access_token, format=format)\n", "\n", " if format == 'json':\n", " data = content\n", " elif format == 'csv':\n", " # if there's no data to show, returns an empty DataFrame and \"No Data to Show\" message\n", " if len(content) == 0:\n", " data = pd.DataFrame()\n", " print('No Data to Show')\n", " else:\n", " data = content.decode('utf-8')\n", " data = pd.read_csv(StringIO(data)) # automatically converting into a Pandas DataFrame when choosing CSV format\n", "\n", " return data" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-26", "metadata": {}, "outputs": [], "source": [ "# calling the last 5 days of history for the first arb month\n", "today = datetime.datetime.now().strftime('%Y-%m-%d')\n", "start = (datetime.datetime.now() - pd.Timedelta(days=5)).strftime('%Y-%m-%d')\n", "\n", "hist_df = fetch_historical_tradable_products(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False,\n", " start=start, end=today, arb_period=arb_month, format='csv')\n", "hist_df.head(10)" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-27", "metadata": {}, "outputs": [], "source": [ "# Group dataframe by contract\n", "contract_groups = hist_df.groupby(['ProductName', 'ProductContractName'])\n", "\n", "# list available contracts\n", "contract_keys = list(contract_groups.groups.keys())\n", "print(contract_keys)" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-28", "metadata": {}, "outputs": [], "source": [ "# Fetch historical prices for a specific contract\n", "cdf = contract_groups.get_group(contract_keys[0])\n", "cdf[['AsOf', 'ArbPeriodName', 'ProductName', 'ProductContractName', 'Value', 'Unit']].tail(10)" ] }, { "cell_type": "markdown", "id": "cell-29", "metadata": {}, "source": [ "## N.B. Historical Data Limits\n", "\n", "Currently, a maximum of 30 historical days can be called at one time.\n", "\n", "If more data points are required, the below code can be used, which calls the historical data 20 days at a time and combines the data into one Pandas DataFrame" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-30", "metadata": {}, "outputs": [], "source": [ "def loop_historical_data(access_token, ticker, via, percent_hire, unit, extended_curve, hist_start, hist_end, arb_period=None):\n", "\n", " # calculating the amount of days to retrieve data for\n", " hist_diff = (datetime.datetime.strptime(hist_end, '%Y-%m-%d') - datetime.datetime.strptime(hist_start, '%Y-%m-%d')).days\n", " t = 0\n", "\n", " starts = []\n", " ends = []\n", "\n", " # iterating through the historical data, 20 days at a time\n", " while t < hist_diff:\n", " # initialising dataframe\n", " if t == 0 and hist_diff >= 21:\n", " diff_end = datetime.datetime.strftime(datetime.datetime.strptime(hist_start, '%Y-%m-%d') + pd.Timedelta(days=20), '%Y-%m-%d')\n", " hist_df = fetch_historical_tradable_products(access_token, ticker=ticker, via=via, percent_hire=percent_hire, unit=unit, extended_curve=extended_curve,\n", " start=hist_start, end=diff_end, arb_period=arb_period, format='csv')\n", "\n", " starts.append(hist_start)\n", " ends.append(diff_end)\n", "\n", " # in case the date range is smaller than 20 days\n", " elif t == 0 and hist_diff < 21:\n", " hist_df = fetch_historical_tradable_products(access_token, ticker=ticker, via=via, percent_hire=percent_hire, unit=unit, extended_curve=extended_curve,\n", " start=hist_start, end=hist_end, arb_period=arb_period, format='csv')\n", "\n", " # looping through the rest of the dates\n", " else:\n", " if t < hist_diff - 20:\n", " diff_start = datetime.datetime.strftime(datetime.datetime.strptime(hist_start, '%Y-%m-%d') + pd.Timedelta(days=t), '%Y-%m-%d')\n", " diff_end = datetime.datetime.strftime(datetime.datetime.strptime(diff_start, '%Y-%m-%d') + pd.Timedelta(days=20), '%Y-%m-%d')\n", " hist2 = fetch_historical_tradable_products(access_token, ticker=ticker, via=via, percent_hire=percent_hire, unit=unit, extended_curve=extended_curve,\n", " start=diff_start, end=diff_end, arb_period=arb_period, format='csv')\n", " hist_df = pd.concat([hist_df, hist2])\n", " starts.append(diff_start)\n", " ends.append(diff_end)\n", " # final loop\n", " else:\n", " diff_start = datetime.datetime.strftime(datetime.datetime.strptime(hist_start, '%Y-%m-%d') + pd.Timedelta(days=t), '%Y-%m-%d')\n", " diff_end = hist_end\n", " hist2 = fetch_historical_tradable_products(access_token, ticker=ticker, via=via, percent_hire=percent_hire, unit=unit, extended_curve=extended_curve,\n", " start=diff_start, end=diff_end, arb_period=arb_period, format='csv')\n", " hist_df = pd.concat([hist_df, hist2])\n", " starts.append(diff_start)\n", " ends.append(diff_end)\n", "\n", " t += 20\n", "\n", " if len(hist_df) > 0:\n", " hist_df['Value'] = pd.to_numeric(hist_df['Value'])\n", " hist_df['AsOf'] = pd.to_datetime(hist_df['AsOf'], utc=True).dt.tz_localize(None)\n", " hist_df = hist_df.drop_duplicates()\n", "\n", " return hist_df" ] }, { "cell_type": "code", "execution_count": null, "id": "cell-31", "metadata": {}, "outputs": [], "source": [ "# Calling the extended historical data function\n", "today = datetime.datetime.now().strftime('%Y-%m-%d')\n", "\n", "hist_df = loop_historical_data(access_token, ticker=my_fobport, via='cogh', percent_hire=100,\n", " unit='usd-per-mmbtu', extended_curve=False,\n", " hist_start='2026-10-01', hist_end=today, arb_period=arb_month)\n", "hist_df.head(5)" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.9" } }, "nbformat": 4, "nbformat_minor": 5 }