Spaces:
Build error
Build error
File size: 36,311 Bytes
e3b9b11 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Decentralised_medical_Records.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyMepu9EEVA+RG5KDFQZcrKE",
"include_colab_link": true
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/YUVRAJ06singh08deora/BlockChain_Medical_Records/blob/main/Decentralised_medical_Records.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JpeXeDyldLHY",
"outputId": "eb5758be-05b9-462d-ddbc-90402f809fa3"
},
"source": [
"!apt install libsodium-dev libsecp256k1-dev libgmp-dev\n",
"!pip install pytezos==3.2.6"
],
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Reading package lists... Done\n",
"Building dependency tree \n",
"Reading state information... Done\n",
"libgmp-dev is already the newest version (2:6.1.2+dfsg-2).\n",
"libsodium-dev is already the newest version (1.0.16-2).\n",
"libsecp256k1-dev is already the newest version (0.1~20170810-1).\n",
"0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.\n",
"Requirement already satisfied: pytezos==3.2.6 in /usr/local/lib/python3.7/dist-packages (3.2.6)\n",
"Requirement already satisfied: loguru in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.5.3)\n",
"Requirement already satisfied: cattrs<2.0.0,>=1.3.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.8.0)\n",
"Requirement already satisfied: netstruct in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.1.2)\n",
"Requirement already satisfied: pysodium==0.7.7 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.7.7)\n",
"Requirement already satisfied: strict_rfc3339==0.7 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.7)\n",
"Requirement already satisfied: testcontainers<4.0.0,>=3.2.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (3.4.2)\n",
"Requirement already satisfied: typing-extensions<4.0.0,>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (3.10.0.2)\n",
"Requirement already satisfied: jupyter-client<7.0.0,>=6.1.12 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (6.1.12)\n",
"Requirement already satisfied: pendulum in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (2.1.2)\n",
"Requirement already satisfied: cached-property<2.0.0,>=1.5.2 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.5.2)\n",
"Requirement already satisfied: tabulate<0.9.0,>=0.8.9 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.8.9)\n",
"Requirement already satisfied: jsonschema<4.0.0,>=3.2.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (3.2.0)\n",
"Requirement already satisfied: bson<0.6.0,>=0.5.10 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.5.10)\n",
"Requirement already satisfied: simplejson in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (3.17.5)\n",
"Requirement already satisfied: docker<5.0.0,>=4.4.4 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (4.4.4)\n",
"Requirement already satisfied: ply in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (3.11)\n",
"Requirement already satisfied: click<9.0.0,>=8.0.1 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (8.0.3)\n",
"Requirement already satisfied: py_ecc in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (5.2.0)\n",
"Requirement already satisfied: secp256k1==0.13.2 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.13.2)\n",
"Requirement already satisfied: bravado<12.0.0,>=11.0.3 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (11.0.3)\n",
"Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (4.62.3)\n",
"Requirement already satisfied: deprecation in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (2.1.0)\n",
"Requirement already satisfied: cattrs-extras<0.2.0,>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.1.1)\n",
"Requirement already satisfied: fastecdsa==1.7.5 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.7.5)\n",
"Requirement already satisfied: requests<3.0.0,>=2.21.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (2.23.0)\n",
"Requirement already satisfied: mnemonic in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (0.20)\n",
"Requirement already satisfied: pysha3==1.0.2 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.0.2)\n",
"Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (3.13)\n",
"Requirement already satisfied: base58<2.0.0,>=1.0.3 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.0.3)\n",
"Requirement already satisfied: ipykernel<6.0.0,>=5.5.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (5.5.6)\n",
"Requirement already satisfied: notebook<7.0.0,>=6.3.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (6.4.5)\n",
"Requirement already satisfied: pyblake2<2.0.0,>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (1.1.2)\n",
"Requirement already satisfied: attrs<21.0.0,>=20.3.0 in /usr/local/lib/python3.7/dist-packages (from pytezos==3.2.6) (20.3.0)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from fastecdsa==1.7.5->pytezos==3.2.6) (1.15.0)\n",
"Requirement already satisfied: cffi>=1.3.0 in /usr/local/lib/python3.7/dist-packages (from secp256k1==0.13.2->pytezos==3.2.6) (1.15.0)\n",
"Requirement already satisfied: bravado-core>=5.16.1 in /usr/local/lib/python3.7/dist-packages (from bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (5.17.0)\n",
"Requirement already satisfied: monotonic in /usr/local/lib/python3.7/dist-packages (from bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (1.6)\n",
"Requirement already satisfied: msgpack in /usr/local/lib/python3.7/dist-packages (from bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (1.0.2)\n",
"Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (2.8.2)\n",
"Requirement already satisfied: swagger-spec-validator>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from bravado-core>=5.16.1->bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (2.7.4)\n",
"Requirement already satisfied: jsonref in /usr/local/lib/python3.7/dist-packages (from bravado-core>=5.16.1->bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (0.2)\n",
"Requirement already satisfied: pytz in /usr/local/lib/python3.7/dist-packages (from bravado-core>=5.16.1->bravado<12.0.0,>=11.0.3->pytezos==3.2.6) (2018.9)\n",
"Requirement already satisfied: dateutils<0.7.0,>=0.6.12 in /usr/local/lib/python3.7/dist-packages (from cattrs-extras<0.2.0,>=0.1.1->pytezos==3.2.6) (0.6.12)\n",
"Requirement already satisfied: pytimeparse<2.0.0,>=1.1.8 in /usr/local/lib/python3.7/dist-packages (from cattrs-extras<0.2.0,>=0.1.1->pytezos==3.2.6) (1.1.8)\n",
"Requirement already satisfied: typing-inspect<0.7.0,>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from cattrs-extras<0.2.0,>=0.1.1->pytezos==3.2.6) (0.6.0)\n",
"Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.3.0->secp256k1==0.13.2->pytezos==3.2.6) (2.21)\n",
"Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from click<9.0.0,>=8.0.1->pytezos==3.2.6) (4.8.2)\n",
"Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.7/dist-packages (from docker<5.0.0,>=4.4.4->pytezos==3.2.6) (1.2.1)\n",
"Requirement already satisfied: tornado>=4.2 in /usr/local/lib/python3.7/dist-packages (from ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (6.1)\n",
"Requirement already satisfied: traitlets>=4.1.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (5.1.1)\n",
"Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.7/dist-packages (from ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (0.2.0)\n",
"Requirement already satisfied: ipython>=5.0.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (5.5.0)\n",
"Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (2.6.1)\n",
"Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (57.4.0)\n",
"Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (1.0.18)\n",
"Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (4.4.2)\n",
"Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (0.7.5)\n",
"Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (0.8.1)\n",
"Requirement already satisfied: pexpect in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (4.8.0)\n",
"Requirement already satisfied: pyrsistent>=0.14.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema<4.0.0,>=3.2.0->pytezos==3.2.6) (0.18.0)\n",
"Requirement already satisfied: webcolors in /usr/local/lib/python3.7/dist-packages (from jsonschema<4.0.0,>=3.2.0->pytezos==3.2.6) (1.11.1)\n",
"Requirement already satisfied: jsonpointer>1.13 in /usr/local/lib/python3.7/dist-packages (from jsonschema<4.0.0,>=3.2.0->pytezos==3.2.6) (2.2)\n",
"Requirement already satisfied: rfc3987 in /usr/local/lib/python3.7/dist-packages (from jsonschema<4.0.0,>=3.2.0->pytezos==3.2.6) (1.3.8)\n",
"Requirement already satisfied: idna in /usr/local/lib/python3.7/dist-packages (from jsonschema<4.0.0,>=3.2.0->pytezos==3.2.6) (2.10)\n",
"Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client<7.0.0,>=6.1.12->pytezos==3.2.6) (22.3.0)\n",
"Requirement already satisfied: jupyter-core>=4.6.0 in /usr/local/lib/python3.7/dist-packages (from jupyter-client<7.0.0,>=6.1.12->pytezos==3.2.6) (4.9.1)\n",
"Requirement already satisfied: Send2Trash>=1.5.0 in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (1.8.0)\n",
"Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (2.11.3)\n",
"Requirement already satisfied: nbformat in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (5.1.3)\n",
"Requirement already satisfied: nbconvert in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (5.6.1)\n",
"Requirement already satisfied: argon2-cffi in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (21.1.0)\n",
"Requirement already satisfied: terminado>=0.8.3 in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.12.1)\n",
"Requirement already satisfied: prometheus-client in /usr/local/lib/python3.7/dist-packages (from notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.12.0)\n",
"Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=5.0.0->ipykernel<6.0.0,>=5.5.0->pytezos==3.2.6) (0.2.5)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.21.0->pytezos==3.2.6) (3.0.4)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.21.0->pytezos==3.2.6) (1.24.3)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.21.0->pytezos==3.2.6) (2021.10.8)\n",
"Requirement already satisfied: ptyprocess in /usr/local/lib/python3.7/dist-packages (from terminado>=0.8.3->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.7.0)\n",
"Requirement already satisfied: wrapt in /usr/local/lib/python3.7/dist-packages (from testcontainers<4.0.0,>=3.2.0->pytezos==3.2.6) (1.13.3)\n",
"Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.7/dist-packages (from typing-inspect<0.7.0,>=0.6.0->cattrs-extras<0.2.0,>=0.1.1->pytezos==3.2.6) (0.4.3)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from deprecation->pytezos==3.2.6) (21.2)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->click<9.0.0,>=8.0.1->pytezos==3.2.6) (3.6.0)\n",
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (2.0.1)\n",
"Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.5.0)\n",
"Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.3)\n",
"Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.8.4)\n",
"Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.7.1)\n",
"Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (4.1.0)\n",
"Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (1.5.0)\n",
"Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook<7.0.0,>=6.3.0->pytezos==3.2.6) (0.5.1)\n",
"Requirement already satisfied: pyparsing<3,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->deprecation->pytezos==3.2.6) (2.4.7)\n",
"Requirement already satisfied: pytzdata>=2020.1 in /usr/local/lib/python3.7/dist-packages (from pendulum->pytezos==3.2.6) (2020.1)\n",
"Requirement already satisfied: eth-typing<3.0.0,>=2.1.0 in /usr/local/lib/python3.7/dist-packages (from py_ecc->pytezos==3.2.6) (2.2.2)\n",
"Requirement already satisfied: eth-utils<2,>=1.3.0 in /usr/local/lib/python3.7/dist-packages (from py_ecc->pytezos==3.2.6) (1.10.0)\n",
"Requirement already satisfied: cytoolz<1.0.0,>=0.10.1 in /usr/local/lib/python3.7/dist-packages (from eth-utils<2,>=1.3.0->py_ecc->pytezos==3.2.6) (0.11.2)\n",
"Requirement already satisfied: eth-hash<0.4.0,>=0.3.1 in /usr/local/lib/python3.7/dist-packages (from eth-utils<2,>=1.3.0->py_ecc->pytezos==3.2.6) (0.3.2)\n",
"Requirement already satisfied: toolz>=0.8.0 in /usr/local/lib/python3.7/dist-packages (from cytoolz<1.0.0,>=0.10.1->eth-utils<2,>=1.3.0->py_ecc->pytezos==3.2.6) (0.11.2)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "sN9l3-9Hd_QF",
"outputId": "a2a3ab9b-8dc0-4b0c-e220-9111eb50fcd3"
},
"source": [
"from pytezos import pytezos\n",
"# import streamlit as st\n",
"\n",
"\n",
"pytezos = pytezos.using(shell = 'https://granadanet.smartpy.io', key='edskRn4MXH7DD9M9QiAKhKRNLCp4LU11iqEcNp6vSqNWB8qksLZckKgQZozdVuX4wum61fNwaesWjgtydm8f3h6NYggFAtPx4f')\n",
"contract = pytezos.contract('KT1RNQMAx4WcKXqAXHyLcKa8CvGFEfvc8E42')\n",
"contract"
],
"execution_count": 9,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<pytezos.jupyter.ContractInterface object at 0x7fabac6a57d0>\n",
"\n",
"Properties\n",
".key\t\ttz1i3YgHNvYm2fUeqssg8rnPD3Z7fQCaCbJm\n",
".shell\t\t['https://granadanet.smartpy.io']\n",
".address\tKT1RNQMAx4WcKXqAXHyLcKa8CvGFEfvc8E42\n",
".block_id\thead\n",
".storage\t# access storage data at block `block_id`\n",
".parameter\t# root entrypoint\n",
"\n",
"Entrypoints\n",
".addPatientRecord()\n",
"\n",
"Helpers\n",
".big_map_get()\n",
".create_from()\n",
".from_context()\n",
".from_file()\n",
".from_micheline()\n",
".from_michelson()\n",
".from_url()\n",
".metadata()\n",
".metadata_url()\n",
".operation_result()\n",
".originate()\n",
".program()\n",
".script()\n",
".storage_from_file()\n",
".storage_from_micheline()\n",
".storage_from_michelson()\n",
".to_file()\n",
".to_micheline()\n",
".to_michelson()\n",
".using()"
]
},
"metadata": {},
"execution_count": 9
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Aum9DisV3UXy",
"outputId": "b83502a3-fd25-451a-c4d0-faec9b8ac01f"
},
"source": [
"usds = pytezos.using(shell = 'https://granadanet.smartpy.io').contract('KT1RNQMAx4WcKXqAXHyLcKa8CvGFEfvc8E42')\n",
"usds"
],
"execution_count": 12,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<pytezos.jupyter.ContractInterface object at 0x7fabaf480e10>\n",
"\n",
"Properties\n",
".key\t\ttz1i3YgHNvYm2fUeqssg8rnPD3Z7fQCaCbJm\n",
".shell\t\t['https://granadanet.smartpy.io']\n",
".address\tKT1RNQMAx4WcKXqAXHyLcKa8CvGFEfvc8E42\n",
".block_id\thead\n",
".storage\t# access storage data at block `block_id`\n",
".parameter\t# root entrypoint\n",
"\n",
"Entrypoints\n",
".addPatientRecord()\n",
"\n",
"Helpers\n",
".big_map_get()\n",
".create_from()\n",
".from_context()\n",
".from_file()\n",
".from_micheline()\n",
".from_michelson()\n",
".from_url()\n",
".metadata()\n",
".metadata_url()\n",
".operation_result()\n",
".originate()\n",
".program()\n",
".script()\n",
".storage_from_file()\n",
".storage_from_micheline()\n",
".storage_from_michelson()\n",
".to_file()\n",
".to_micheline()\n",
".to_michelson()\n",
".using()"
]
},
"metadata": {},
"execution_count": 12
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "lqqB0zQ432B-"
},
"source": [
"usds.using(block_id='head~1').storage()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "yuSUZihO5dVo"
},
"source": [
"usds.storage['87238989191']\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "rzF4wYZ65zsa"
},
"source": [
"usds.storage['87238989191']['Record']()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "8qXS882zeREK"
},
"source": [
"contract"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "XfmiYhSQkSpM",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "48ecd186-efe3-4584-8800-c1ab76652fce"
},
"source": [
"!pip install colab-everything streamlit"
],
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Requirement already satisfied: colab-everything in /usr/local/lib/python3.7/dist-packages (0.0.9)\n",
"Requirement already satisfied: streamlit in /usr/local/lib/python3.7/dist-packages (1.2.0)\n",
"Requirement already satisfied: urllib3==1.25.10 in /usr/local/lib/python3.7/dist-packages (from colab-everything) (1.25.10)\n",
"Requirement already satisfied: pyngrok in /usr/local/lib/python3.7/dist-packages (from colab-everything) (5.1.0)\n",
"Requirement already satisfied: attrs in /usr/local/lib/python3.7/dist-packages (from streamlit) (20.3.0)\n",
"Requirement already satisfied: altair>=3.2.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (4.1.0)\n",
"Requirement already satisfied: click<8.0,>=7.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (7.1.2)\n",
"Requirement already satisfied: watchdog in /usr/local/lib/python3.7/dist-packages (from streamlit) (2.1.6)\n",
"Requirement already satisfied: gitpython!=3.1.19 in /usr/local/lib/python3.7/dist-packages (from streamlit) (3.1.24)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from streamlit) (2.23.0)\n",
"Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from streamlit) (2.8.2)\n",
"Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (7.1.2)\n",
"Requirement already satisfied: base58 in /usr/local/lib/python3.7/dist-packages (from streamlit) (1.0.3)\n",
"Requirement already satisfied: validators in /usr/local/lib/python3.7/dist-packages (from streamlit) (0.18.2)\n",
"Requirement already satisfied: astor in /usr/local/lib/python3.7/dist-packages (from streamlit) (0.8.1)\n",
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from streamlit) (1.19.5)\n",
"Requirement already satisfied: pympler>=0.9 in /usr/local/lib/python3.7/dist-packages (from streamlit) (0.9)\n",
"Requirement already satisfied: pandas>=0.21.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (1.1.5)\n",
"Requirement already satisfied: toml in /usr/local/lib/python3.7/dist-packages (from streamlit) (0.10.2)\n",
"Requirement already satisfied: cachetools>=4.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (4.2.4)\n",
"Requirement already satisfied: tzlocal in /usr/local/lib/python3.7/dist-packages (from streamlit) (1.5.1)\n",
"Requirement already satisfied: protobuf!=3.11,>=3.6.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (3.17.3)\n",
"Requirement already satisfied: pydeck>=0.1.dev5 in /usr/local/lib/python3.7/dist-packages (from streamlit) (0.7.1)\n",
"Requirement already satisfied: blinker in /usr/local/lib/python3.7/dist-packages (from streamlit) (1.4)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from streamlit) (21.2)\n",
"Requirement already satisfied: pyarrow in /usr/local/lib/python3.7/dist-packages (from streamlit) (3.0.0)\n",
"Requirement already satisfied: tornado>=5.0 in /usr/local/lib/python3.7/dist-packages (from streamlit) (6.1)\n",
"Requirement already satisfied: jsonschema in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit) (3.2.0)\n",
"Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit) (2.11.3)\n",
"Requirement already satisfied: entrypoints in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit) (0.3)\n",
"Requirement already satisfied: toolz in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit) (0.11.2)\n",
"Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.7/dist-packages (from gitpython!=3.1.19->streamlit) (4.0.9)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from gitpython!=3.1.19->streamlit) (3.10.0.2)\n",
"Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.7/dist-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.19->streamlit) (5.0.0)\n",
"Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas>=0.21.0->streamlit) (2018.9)\n",
"Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.7/dist-packages (from protobuf!=3.11,>=3.6.0->streamlit) (1.15.0)\n",
"Requirement already satisfied: ipykernel>=5.1.2 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit) (5.5.6)\n",
"Requirement already satisfied: ipywidgets>=7.0.0 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit) (7.6.5)\n",
"Requirement already satisfied: traitlets>=4.3.2 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit) (5.1.1)\n",
"Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.7/dist-packages (from ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (0.2.0)\n",
"Requirement already satisfied: ipython>=5.0.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (5.5.0)\n",
"Requirement already satisfied: jupyter-client in /usr/local/lib/python3.7/dist-packages (from ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (6.1.12)\n",
"Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (1.0.18)\n",
"Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (0.8.1)\n",
"Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (4.4.2)\n",
"Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (0.7.5)\n",
"Requirement already satisfied: pexpect in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (4.8.0)\n",
"Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (57.4.0)\n",
"Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (2.6.1)\n",
"Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (3.5.2)\n",
"Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (1.0.2)\n",
"Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (5.1.3)\n",
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->altair>=3.2.0->streamlit) (2.0.1)\n",
"Requirement already satisfied: jupyter-core in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (4.9.1)\n",
"Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from jsonschema->altair>=3.2.0->streamlit) (4.8.2)\n",
"Requirement already satisfied: pyrsistent>=0.14.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema->altair>=3.2.0->streamlit) (0.18.0)\n",
"Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=5.0.0->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (0.2.5)\n",
"Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.7/dist-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (6.4.5)\n",
"Requirement already satisfied: Send2Trash>=1.5.0 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (1.8.0)\n",
"Requirement already satisfied: nbconvert in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (5.6.1)\n",
"Requirement already satisfied: pyzmq>=17 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (22.3.0)\n",
"Requirement already satisfied: argon2-cffi in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (21.1.0)\n",
"Requirement already satisfied: terminado>=0.8.3 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.12.1)\n",
"Requirement already satisfied: prometheus-client in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.12.0)\n",
"Requirement already satisfied: ptyprocess in /usr/local/lib/python3.7/dist-packages (from terminado>=0.8.3->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.7.0)\n",
"Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (1.15.0)\n",
"Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.0.0->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (2.21)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->jsonschema->altair>=3.2.0->streamlit) (3.6.0)\n",
"Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.8.4)\n",
"Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.5.0)\n",
"Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (4.1.0)\n",
"Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.7.1)\n",
"Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (1.5.0)\n",
"Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit) (0.5.1)\n",
"Requirement already satisfied: pyparsing<3,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->streamlit) (2.4.7)\n",
"Requirement already satisfied: PyYAML in /usr/local/lib/python3.7/dist-packages (from pyngrok->colab-everything) (3.13)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->streamlit) (3.0.4)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->streamlit) (2.10)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->streamlit) (2021.10.8)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "wJMNxzptki1L",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "fe0d1ede-e481-4fa3-ea36-28a3c858d631"
},
"source": [
"from colab_everything import ColabStreamlit\n",
"\n",
"ColabStreamlit('/content/app.py') # streamlit app path"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Web App can be accessed on: http://6302-35-222-78-110.ngrok.io\n",
"\n",
" You can now view your Streamlit app in your browser.\n",
"\n",
" Network URL: http://172.28.0.2:9999\n",
" External URL: http://35.222.78.110:9999\n",
"\n"
]
}
]
}
]
} |