{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### What are the four levels of basket permissions?\n", "\n", "1. **Admin:** Basket admins can view all basket information, edit metadata, submit requests to update basket composition, and permission other users to the basket\n", "2. **Edit:** Editors may view basket data and edit details such as name, description, etc.\n", "3. **Rebalance:** Rebalance permissions enable a user to view basket data and submit and approve rebalance submissions\n", "4. **View:** Viewers are able to see most basket information, but are not able to modify the basket in any way" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from gs_quant.markets.baskets import Basket\n", "from gs_quant.session import Environment, GsSession" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "client = 'CLIENT ID'\n", "secret = 'CLIENT SECRET'\n", "\n", "GsSession.use(Environment.PROD, client_id=client, client_secret=secret, scopes=('read_user_profile',))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "basket = Basket.get('GSMBXXXX') # substitute input with any identifier for a basket" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "basket.entitlements.to_frame()" ] } ], "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.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }