{ "cells": [ { "cell_type": "markdown", "id": "28bea13b-67bd-4a0e-8eab-3b8ffd37259e", "metadata": {}, "source": [ "# Create Cluster: HDB\n", "This notebook will create (start) an HDB cluster on a named database." ] }, { "cell_type": "code", "execution_count": 1, "id": "83c6572a-0972-4867-8c02-ea2c6c98427a", "metadata": { "jupyter": { "source_hidden": true }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "id": "f17a02c0-4f56-455c-a28a-dd102a88201c", "metadata": { "tags": [] }, "source": [ "## Setup\n", "\n", "### Node Types\n", "|Type|Mem (GB)|vCPUs|\n", "|:---|---:|---:|\n", "|kx.s.large|12|2|\n", "|kx.s.xlarge|27|4|\n", "|kx.s.2xlarge|54|8|\n", "|kx.s.4xlarge|108|16|\n", "|kx.s.8xlarge|216|32|\n", "|kx.s.16xlarge|432|64|\n", "|kx.s.32xlarge|864|128|\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "0d5f1d4a-ed45-44e3-bf75-9bdb75fcddbb", "metadata": {}, "outputs": [], "source": [ "import os\n", "import boto3\n", "import json\n", "import datetime\n", "\n", "from managed_kx import *\n", "from env_2 import *\n", "\n", "# Managed KX Database and Cluster names to create\n", "DB_NAME=\"welcomedb\"\n", "\n", "SEC_THREADS='4'\n", "CLUSTER_NAME=f\"HDB_{DB_NAME}\"\n", "\n", "# Cluster Settings\n", "CODEBASE=\"code\"\n", "S3_CODE_PATH=\"code\"\n", "\n", "DB_PATHS = [ '/' ]\n", "\n", "CAPACITY_CONFIG={ 'nodeCount': 3, 'nodeType': 'kx.s.2xlarge'}\n", "DATABASE_CONFIG=[{ 'databaseName': DB_NAME,'cacheConfigurations': [{'dbPaths': DB_PATHS, 'cacheType': 'CACHE_1000' }] }]\n", "CACHE_CONFIG=[{'type': 'CACHE_1000', 'size':1200}]\n", "\n", "CODE_CONFIG={ 's3Bucket': S3_BUCKET, 's3Key': f'{S3_CODE_PATH}/{CODEBASE}.zip' }\n", "\n", "INIT_SCRIPT=f'{CODEBASE}/init.q'\n", "CMD_ARGS=[\n", " { 'key': 's', 'value': SEC_THREADS }, \n", " { 'key': 'dbname', 'value': DB_NAME}, \n", " { 'key': 'codebase', 'value': CODEBASE} \n", "]" ] }, { "cell_type": "code", "execution_count": 3, "id": "3cfe7d89-9f5d-4ceb-ac8c-1f5054a6f15a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using variables ...\n" ] } ], "source": [ "# triggers credential get\n", "session=None\n", "\n", "try:\n", " subprocess.call([\"which\", \"ada\"])\n", " os.system(f\"ada credentials update --account={ACCOUNT_ID} --provider=isengard --role=Admin --once\")\n", "except: \n", " None\n", "\n", "if AWS_ACCESS_KEY_ID is None:\n", " print(\"Using Defaults ...\")\n", " # create AWS sessio: using access variables\n", " session = boto3.Session()\n", "else:\n", " print(\"Using variables ...\")\n", " session = boto3.Session(\n", " aws_access_key_id=AWS_ACCESS_KEY_ID,\n", " aws_secret_access_key=AWS_SECRET_ACCESS_KEY,\n", " aws_session_token=AWS_SESSION_TOKEN\n", " )\n", "\n", "# create finspace client\n", "client = session.client(service_name='finspace', endpoint_url=ENDPOINT_URL)" ] }, { "cell_type": "markdown", "id": "1cd63f1e-0f36-410d-ab75-95fc2031d221", "metadata": {}, "source": [ "## Check Database" ] }, { "cell_type": "code", "execution_count": 4, "id": "f9266a73-d208-4c6a-a50e-9c5b77e99704", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "====================================================================================================\n", "Database: welcomedb, Changesets: 1 \n", "====================================================================================================\n", "Changeset (COMPLETED): isRIOfpd2lyrudnX5paQQA: Created: 2023-06-06 11:24:58.428000+00:00\n" ] }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
changeTypes3PathdbPath
PUTs3://kdb-demo-612841383594-kms/data/hdb//
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "note_str = \"\"\n", "\n", "c_set_list = []\n", "\n", "try:\n", " c_set_list = client.list_kx_changesets(environmentId=ENV_ID, databaseName=DB_NAME)['kxChangesets']\n", "except:\n", " note_str = \"<>\"\n", "\n", "print(100*\"=\")\n", "print(f\"Database: {DB_NAME}, Changesets: {len(c_set_list)} {note_str}\")\n", "print(100*\"=\")\n", "\n", "# sort by create time\n", "c_set_list = sorted(c_set_list, key=lambda d: d['createdTimestamp']) \n", "\n", "for c in c_set_list:\n", " c_set_id = c['changesetId']\n", " print(f\"Changeset ({c['status']}): {c_set_id}: Created: {c['createdTimestamp']}\")\n", " c_rqs = client.get_kx_changeset(environmentId=ENV_ID, databaseName=DB_NAME, changesetId=c_set_id)['changeRequests']\n", "\n", " chs_pdf = pd.DataFrame.from_dict(c_rqs).style.hide(axis='index')\n", " display(chs_pdf)" ] }, { "cell_type": "markdown", "id": "67476efe-d308-4158-9e24-8fbe71509f76", "metadata": {}, "source": [ "## Create Cluster" ] }, { "cell_type": "code", "execution_count": 5, "id": "3e39ebf3-6940-40f1-a7f8-90efb3846f7b", "metadata": {}, "outputs": [], "source": [ "resp = client.create_kx_cluster(\n", " environmentId=ENV_ID, \n", " clusterName=CLUSTER_NAME,\n", " clusterType='HDB',\n", " releaseLabel = '1.0',\n", " capacityConfiguration=CAPACITY_CONFIG,\n", " databases=DATABASE_CONFIG,\n", " cacheStorageConfigurations=CACHE_CONFIG,\n", " clusterDescription=\"Created with create_cluster_HDB notebook\",\n", " code=CODE_CONFIG,\n", " initializationScript=INIT_SCRIPT,\n", " commandLineArguments=CMD_ARGS,\n", " azMode=AZ_MODE,\n", " availabilityZoneId=AZ_ID,\n", " vpcConfiguration={ \n", " 'vpcId': VPC_ID,\n", " 'securityGroupIds': SECURITY_GROUPS,\n", " 'subnetIds': SUBNET_IDS,\n", " 'ipAddressType': 'IP_V4' }\n", ")" ] }, { "cell_type": "code", "execution_count": 6, "id": "221dd470-b42a-43a5-9d1e-60e7da267455", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'ResponseMetadata': {'RequestId': '6047fec7-f921-4203-ac05-cf0451b21b78',\n", " 'HTTPStatusCode': 200,\n", " 'HTTPHeaders': {'content-type': 'application/json',\n", " 'content-length': '1104',\n", " 'connection': 'keep-alive',\n", " 'date': 'Tue, 06 Jun 2023 11:32:14 GMT',\n", " 'x-amzn-requestid': '6047fec7-f921-4203-ac05-cf0451b21b78',\n", " 'x-amz-apigw-id': 'GGDhOHnToAMFuJg=',\n", " 'x-amzn-trace-id': 'Root=1-647f193a-512446975580ccff4805d4c0',\n", " 'x-cache': 'Miss from cloudfront',\n", " 'via': '1.1 aef197034a978e986954f2826c90b090.cloudfront.net (CloudFront)',\n", " 'x-amz-cf-pop': 'IAD55-P1',\n", " 'x-amz-cf-id': '3-QMC4ykphBRhaR2hJ5LX5xWHyT3mrdNQ1Txi2R7p-SUR2bVcbJt7g=='},\n", " 'RetryAttempts': 0},\n", " 'status': 'PENDING',\n", " 'clusterName': 'HDB_welcomedb',\n", " 'clusterType': 'HDB',\n", " 'databases': [{'databaseName': 'welcomedb',\n", " 'cacheConfigurations': [{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}],\n", " 'changesetId': 'isRIOfpd2lyrudnX5paQQA'}],\n", " 'cacheStorageConfigurations': [{'type': 'CACHE_1000', 'size': 1200}],\n", " 'clusterDescription': 'Created with create_cluster_HDB notebook',\n", " 'capacityConfiguration': {'nodeType': 'kx.s.2xlarge', 'nodeCount': 3},\n", " 'releaseLabel': '1.0',\n", " 'vpcConfiguration': {'vpcId': 'vpc-0e702dec545865b11',\n", " 'securityGroupIds': ['sg-018111774e795682d'],\n", " 'subnetIds': ['subnet-0f97cae6600859c17'],\n", " 'ipAddressType': 'IP_V4'},\n", " 'initializationScript': 'code/init.q',\n", " 'commandLineArguments': [{'key': 's', 'value': '4'},\n", " {'key': 'dbname', 'value': 'welcomedb'},\n", " {'key': 'codebase', 'value': 'code'}],\n", " 'code': {'s3Bucket': 'kdb-demo-612841383594-kms', 's3Key': 'code/code.zip'},\n", " 'lastModifiedTimestamp': datetime.datetime(2023, 6, 6, 11, 32, 13, 709000, tzinfo=tzlocal()),\n", " 'azMode': 'SINGLE',\n", " 'availabilityZoneId': 'use1-az4',\n", " 'createdTimestamp': datetime.datetime(2023, 6, 6, 11, 32, 13, 700000, tzinfo=tzlocal())}" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "resp" ] }, { "cell_type": "code", "execution_count": 7, "id": "e9946083-c9bb-4ecc-afbd-8c20e284ddf5", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Cluster: HDB_welcomedb status is PENDING, total wait 0:00:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:00:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:01:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:01:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:02:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:02:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:03:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:03:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:04:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:04:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:05:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:05:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:06:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:06:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:07:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:07:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:08:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:08:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:09:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:09:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:10:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:10:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:11:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:11:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:12:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:12:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:13:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:13:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:14:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:14:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:15:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:15:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:16:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:16:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:17:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:17:30, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is CREATING, total wait 0:18:00, waiting 30 sec ...\n", "Cluster: HDB_welcomedb status is now RUNNING, total wait 0:18:30\n", "\n", "** DONE **\n" ] } ], "source": [ "wait_for_cluster_status(client, environmentId=ENV_ID, clusterName=CLUSTER_NAME, show_wait=True)\n", "print()\n", "print(\"** DONE **\")" ] }, { "cell_type": "code", "execution_count": null, "id": "b3f504ff-b849-4750-86dc-10bd427caf0d", "metadata": {}, "outputs": [], "source": [ "# Give permissions time to propogate after cluster creation....\n", "time.sleep(60)" ] }, { "cell_type": "code", "execution_count": 9, "id": "fdf68901-fbb9-44e1-a131-e16386bcd312", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ ":tcps://vpce-059110fcb074ef975-uyzzkvgm.vpce-svc-099e64025966b40d1.us-east-1.vpce.amazonaws.com:443:bob:Host=vpce-059110fcb074ef975-uyzzkvgm.vpce-svc-099e64025966b40d1.us-east-1.vpce.amazonaws.com&Port=5000&User=bob&Action=finspace%3AConnectKxCluster&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEP3%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQDk%2FWbQaFt94YuV%2BGV9OMrNc3uRQLc%2FH1MuGBWdDlEzqQIgb%2BGEJzmYHBxxABXdbR3NsVKDQzny8rzdZtmLa7Avzowq%2BAIIRhAAGgw2MTI4NDEzODM1OTQiDA%2F%2FljEC4Fa5qwBX7irVAjMODMSbjPuAOYavgu%2Ft142H0Yf47p1ftYb7dU1Lty4jDFWa9fqrsIIqYNRSR8nJ2GRkJBYWNMcxBEX5E7kfIZXiNQ6KM7hy41LwbpIDVo4So2fRDqbQj890uy5USBSJdkfFAPPKavGqs%2Bd4RJKjq%2FD3B2jlAad4rUXK8NmeXEBfPWgpC2Py45RIvjrjOUN7h9b5qRe99RBzsIWOxu1%2B%2FJL1RjLeCBk9uejOejbPtx0Hq3UQJN%2FihJsyaH1ACziG9LVBWM1Erkn06x6HFIZslFJ9T1ya5R8htG37U%2FMgHkKIaoesBWS1Wpr%2BpOLz5bBMAKtXlNcBZwv1A1uUUOKwLbWJfjzi65y%2BEGHEmjNxfDTUB5IoBNQOeoVcV1cTh6Wz3BXcBsuc8WtiLLEpLQjIZBiiKjBC1OmEDfTdcvwelRiQLtg1Ii4fPuwpX7rF99SkRQA1%2BLmqMM7c%2FKMGOr8B8chOD%2BWU%2BUW9npIGZ0WX1eGvm4SfFfzsC1n1rjoZd86ChKfayKGPYTz4ulnr%2FR8mUlAVmCDiOin9cD4vpsK0jdDEImNHye0gWC5fYZfCZDiqYNrNlfUeNQaRBQp2kDbKkGMsXNvKbgDx20nqaUU2OEMlMsapkQ4WvchBe%2BSskztV8v4s3XZCYBa8UB7xFHRz4NQEjA4OQLQ4CAVzC59xKSwYUjkl%2FQLnK%2Fsz7bIKWaGD5KvgnA2991IzNBYKXWk%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230606T130206Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=ASIAY5MBRM2VATMSKXZK%2F20230606%2Fus-east-1%2Ffinspace-apricot%2Faws4_request&X-Amz-Signature=00a24784ac4c516539fc702167e3036324e3138c77ee006002dcff64295d5e25\n" ] } ], "source": [ "conn_str = get_kx_connection_string(client, environmentId=ENV_ID, clusterName=CLUSTER_NAME, userName=KDB_USERNAME, boto_session=session)\n", "print(conn_str)" ] }, { "cell_type": "code", "execution_count": 10, "id": "1c50c578-05e8-49e7-8deb-1f6b94b10221", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
clusterNamestatusclusterTypecapacityConfigurationcommandLineArgumentsclusterDescriptionlastModifiedTimestampcreatedTimestampdatabaseNamecacheConfigurations
HDB_TAQ_2021_2DRUNNINGHDB{'nodeType': 'kx.s.32xlarge', 'nodeCount': 2}[{'key': 's', 'value': '8'}, {'key': 'dbname', 'value': 'TAQ_2021_2D'}, {'key': 'codebase', 'value': 'taqcode'}]Created with create_cluster_TAQ_2D notebook2023-06-06 12:54:08.985000+00:002023-06-06 12:40:07.108000+00:00TAQ_2021_2D[{'cacheType': 'CACHE_1000', 'dbPaths': ['/2021.01.04/', '/2021.01.05/']}]
HDB_basictickdb_20230601RUNNINGHDB{'nodeType': 'kx.s.xlarge', 'nodeCount': 2}[{'key': 's', 'value': '8'}, {'key': 'dbname', 'value': 'basictickdb'}, {'key': 'codebase', 'value': 'basictick'}]Created with create_HDB for basic_tick notebook2023-06-06 11:52:52.544000+00:002023-06-06 11:35:14.234000+00:00basictickdb[{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}]
HDB_welcomedbRUNNINGHDB{'nodeType': 'kx.s.2xlarge', 'nodeCount': 3}[{'key': 's', 'value': '4'}, {'key': 'dbname', 'value': 'welcomedb'}, {'key': 'codebase', 'value': 'code'}]Created with create_cluster_HDB notebook2023-06-06 11:50:28.453000+00:002023-06-06 11:32:13.700000+00:00welcomedb[{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}]
RDB_basictickdb_20230601RUNNINGRDB{'nodeType': 'kx.s.2xlarge', 'nodeCount': 1}[{'key': 's', 'value': '8'}, {'key': 'dbname', 'value': 'basictickdb'}, {'key': 'codebase', 'value': 'basictick'}, {'key': 'tphostfile', 'value': 'tickerplant2'}]Created with create_RDB notebook2023-06-06 11:54:07.399000+00:002023-06-06 11:38:47.020000+00:00basictickdb[]
RDB_welcomedbRUNNINGRDB{'nodeType': 'kx.s.2xlarge', 'nodeCount': 1}[{'key': 's', 'value': '8'}, {'key': 'dbname', 'value': 'welcomedb'}, {'key': 'codebase', 'value': 'code'}]Created with create_cluster_RDB notebook2023-06-06 11:47:08.448000+00:002023-06-06 11:32:06.677000+00:00welcomedb[]
cluster_create_delete_db_20230606_1132RUNNINGHDB{'nodeType': 'kx.s.xlarge', 'nodeCount': 2}[{'key': 's', 'value': '4'}, {'key': 'dbname', 'value': 'create_delete_db_20230606_1132'}, {'key': 'codebase', 'value': 'code'}]Demo Cluster for database create_delete_db_20230606_11322023-06-06 11:50:54.875000+00:002023-06-06 11:33:18.188000+00:00create_delete_db_20230606_1132[{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}]
hdb-cluster-welcomedbRUNNINGHDB{'nodeType': 'kx.s.xlarge', 'nodeCount': 2}[{'key': 's', 'value': '4'}, {'key': 'dbname', 'value': 'welcomedb'}, {'key': 'codebase', 'value': 'code'}]None2023-06-06 11:44:19.914000+00:002023-06-06 11:26:51.517000+00:00welcomedb[{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}]
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "cdf = get_clusters(client, ENV_ID)\n", "\n", "display(cdf)" ] }, { "cell_type": "code", "execution_count": 11, "id": "86f33240-bb12-49f3-8d9c-5783c25eb182", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Last Run: 2023-06-06 13:02:08.668157\n" ] } ], "source": [ "print( f\"Last Run: {datetime.datetime.now()}\" )" ] }, { "cell_type": "code", "execution_count": null, "id": "e4f0d8e3-7a79-4f5d-b68b-c7e5b44c6685", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.12" } }, "nbformat": 4, "nbformat_minor": 5 }