{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import urllib.parse" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "query = \"\"\"PREFIX rdf: \n", "PREFIX rdfs: \n", "SELECT ?s ?o WHERE {\n", " ?s a ?o .\n", "} LIMIT 100\n", "\n", "\"\"\"\n", "# td:type 'https://cogito.iot.linkeddata.es/quality#InformationResource' ." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "PREFIX%20rdf%3A%20%3Chttp%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A//www.w3.org/2000/01/rdf-schema%23%3E%0ASELECT%20%3Fs%20%3Fo%20WHERE%20%7B%0A%20%20%3Fs%20a%20%3Fo%20.%0A%7D%20LIMIT%20100%0A%0A\n" ] } ], "source": [ "print(urllib.parse.quote(query))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.10.2 64-bit ('3.10.2')", "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.10.2" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "a9c44c8ff930b067c6bc3f134a348d3cb9f19f01dfb46c39e0c18c228169b636" } } }, "nbformat": 4, "nbformat_minor": 2 }