mango-explorer/ShowGroup.ipynb

136 lines
4.0 KiB
Plaintext
Raw Normal View History

2021-04-14 08:51:39 -07:00
{
"cells": [
{
"cell_type": "markdown",
"id": "pointed-polish",
2021-04-15 02:59:04 -07:00
"metadata": {},
"source": [
"# ⚠ Warning\n",
"\n",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"\n",
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/OpinionatedGeek%2Fmango-explorer/HEAD?filepath=ShowGroup.ipynb) _🏃 To run this notebook press the ⏩ icon in the toolbar above._\n",
2021-04-23 01:28:09 -07:00
"\n",
"[🥭 Mango Markets](https://mango.markets/) support is available at: [Docs](https://docs.mango.markets/) | [Discord](https://discord.gg/67jySBhxrg) | [Twitter](https://twitter.com/mangomarkets) | [Github](https://github.com/blockworks-foundation) | [Email](mailto:hello@blockworks.foundation)"
2021-04-15 02:59:04 -07:00
]
},
{
"cell_type": "markdown",
"id": "authorized-channel",
2021-04-14 08:51:39 -07:00
"metadata": {},
"source": [
"# 🥭 Show Group\n",
2021-04-15 02:59:04 -07:00
"\n",
"This notebook tries to display information about a specific Mango Markets group.\n",
2021-04-14 08:51:39 -07:00
"\n",
"It fetches the data from Solana, parses it, and then prints it.\n"
]
},
{
"cell_type": "markdown",
"id": "quality-magnet",
2021-04-14 08:51:39 -07:00
"metadata": {},
"source": [
"## How To Use This Page\n",
"\n",
"Enter the name of the group you want to check in the value for `GROUP_TO_LOOK_UP` in the box below, between the double-quote marks. Then run the notebook by choosing 'Run > Run All Cells' from the notebook menu at the top of the page."
2021-04-14 08:51:39 -07:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "young-exclusion",
"metadata": {},
"outputs": [],
"source": [
"GROUP_TO_LOOK_UP = \"\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "strange-crack",
"metadata": {},
"outputs": [],
"source": [
"if __name__ == \"__main__\":\n",
" import mango\n",
"\n",
" if GROUP_TO_LOOK_UP == \"\":\n",
" raise Exception(\"No group to look up - try setting the variable GROUP_TO_LOOK_UP to an group's public key.\")\n",
"\n",
" context = mango.default_context.new_from_group_name(GROUP_TO_LOOK_UP)\n",
" group = mango.Group.load(context)\n",
" print(group)\n"
2021-04-14 08:51:39 -07:00
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.8.6"
},
"metadata": {
"interpreter": {
"hash": "ac2eaa0ea0ebeafcc7822e65e46aa9d4f966f30b695406963e145ea4a91cd4fc"
}
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": true
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
2021-04-14 08:51:39 -07:00
}
},
"nbformat": 4,
"nbformat_minor": 5
}