{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Change CARTO table privacy\n", "\n", "This example illustrates how to change the privacy of a CARTO table.\n", "\n", "_Note: You'll need [CARTO Account](https://carto.com/signup) credentials to reproduce this example._" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from cartoframes.auth import set_default_credentials\n", "\n", "set_default_credentials('creds.json')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Success! Table updated correctly\n" ] }, { "data": { "text/plain": [ "'PRIVATE'" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from cartoframes import update_privacy_table, describe_table\n", "\n", "update_privacy_table('my_table', 'private')\n", "\n", "describe_table('my_table')['privacy']" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Success! Table updated correctly\n" ] }, { "data": { "text/plain": [ "'PUBLIC'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "update_privacy_table('my_table', 'public')\n", "\n", "describe_table('my_table')['privacy']" ] } ], "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.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }