{"id":462,"date":"2025-07-14T01:59:38","date_gmt":"2025-07-14T01:59:38","guid":{"rendered":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/"},"modified":"2025-07-14T01:59:38","modified_gmt":"2025-07-14T01:59:38","slug":"building-data-driven-desktop-applications-with-pyqt-and-databases","status":"publish","type":"post","link":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/","title":{"rendered":"Building Data-Driven Desktop Applications with PyQt and Databases"},"content":{"rendered":"<h1>Building Data-Driven Desktop Applications with PyQt and Databases \ud83c\udfaf<\/h1>\n<h2>Executive Summary<\/h2>\n<p>Dive into the world of <strong>PyQt database application development<\/strong>. This guide provides a practical roadmap for building robust desktop applications that seamlessly integrate with databases. We&#8217;ll explore PyQt&#8217;s powerful GUI framework, learn how to connect to various database systems (such as SQLite, PostgreSQL, and MySQL), and demonstrate how to display, manipulate, and visualize data within your applications. By combining PyQt&#8217;s intuitive interface with the reliability of databases, you&#8217;ll be equipped to create sophisticated and user-friendly desktop applications that handle complex data management tasks. Get ready to unlock the potential of data-driven desktop development!<\/p>\n<p>Desktop applications still hold a significant place in various industries, offering speed, security, and control that web applications sometimes can&#8217;t match. Coupled with the power of a well-structured database, they become invaluable tools for data analysis, management, and visualization. This article will guide you through the process of crafting such applications using PyQt, a Python binding for Qt, a cross-platform application development framework.<\/p>\n<h2>Key Concepts in PyQt Database Integration<\/h2>\n<p>Before we jump into code, let&#8217;s understand the foundational concepts.<\/p>\n<ul>\n<li><strong>Database Connectivity:<\/strong> Establishing a link between your PyQt application and the database server is the first step. We&#8217;ll explore different drivers and connection methods.<\/li>\n<li><strong>SQL Fundamentals:<\/strong> A solid grasp of SQL (Structured Query Language) is essential for retrieving, inserting, updating, and deleting data from the database.<\/li>\n<li><strong>Data Binding:<\/strong> This involves linking database records to GUI elements in your PyQt application, enabling real-time updates and data synchronization.<\/li>\n<li><strong>GUI Design:<\/strong> Creating an intuitive and user-friendly interface is crucial for the application&#8217;s usability. PyQt provides a rich set of widgets for this purpose.<\/li>\n<li><strong>Error Handling:<\/strong> Implementing robust error handling mechanisms is vital for maintaining application stability and providing informative feedback to the user.<\/li>\n<\/ul>\n<h2>Setting Up Your Development Environment \u2728<\/h2>\n<p>The first step is setting up your environment. You&#8217;ll need Python, PyQt, and a database system. Here&#8217;s how:<\/p>\n<ul>\n<li><strong>Install Python:<\/strong> If you haven&#8217;t already, download and install Python from python.org. Ensure you have pip (Python Package Installer) installed.<\/li>\n<li><strong>Install PyQt:<\/strong> Open your terminal or command prompt and run: <code>pip install PyQt5<\/code> and <code>pip install PyQt5-tools<\/code>.<\/li>\n<li><strong>Choose a Database:<\/strong> For simplicity, we&#8217;ll use SQLite, which is file-based and doesn&#8217;t require a separate server.  Other options include PostgreSQL, MySQL, and MongoDB (with appropriate drivers).<br \/>\n            If you plan for web development, consider using DoHost <a href=\"https:\/\/dohost.us\" target=\"_blank\">https:\/\/dohost.us<\/a> services for your backend database server.<\/li>\n<li><strong>Install Database Driver:<\/strong> For SQLite, Python usually includes the <code>sqlite3<\/code> module. For others (PostgreSQL, MySQL), install the respective drivers using pip (e.g., <code>pip install psycopg2<\/code> for PostgreSQL).<\/li>\n<\/ul>\n<h2>Connecting to the Database and Executing Queries \ud83d\udcc8<\/h2>\n<p>Now, let&#8217;s write some code to connect to the database and execute SQL queries.  This is the core of <strong>PyQt database application development<\/strong>.<\/p>\n<pre><code class=\"language-python\">\nimport sys\nimport sqlite3\nfrom PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout\n\ndef connect_to_database():\n    try:\n        connection = sqlite3.connect('mydatabase.db')  # Replace with your database name\n        cursor = connection.cursor()\n        print(\"Successfully connected to the database\")\n        return connection, cursor\n    except sqlite3.Error as e:\n        print(f\"Error connecting to database: {e}\")\n        return None, None\n\ndef create_table(cursor):\n    try:\n        cursor.execute(\"\"\"\n            CREATE TABLE IF NOT EXISTS users (\n                id INTEGER PRIMARY KEY,\n                name TEXT NOT NULL,\n                email TEXT\n            )\n        \"\"\")\n        print(\"Table 'users' created (if it didn't exist)\")\n    except sqlite3.Error as e:\n        print(f\"Error creating table: {e}\")\n\ndef insert_data(cursor):\n    try:\n        cursor.execute(\"INSERT INTO users (name, email) VALUES (?, ?)\", ('Alice', 'alice@example.com'))\n        cursor.execute(\"INSERT INTO users (name, email) VALUES (?, ?)\", ('Bob', 'bob@example.com'))\n        print(\"Data inserted into 'users' table\")\n    except sqlite3.Error as e:\n        print(f\"Error inserting data: {e}\")\n\ndef fetch_data(cursor):\n    try:\n        cursor.execute(\"SELECT * FROM users\")\n        rows = cursor.fetchall()\n        return rows\n    except sqlite3.Error as e:\n        print(f\"Error fetching data: {e}\")\n        return []\n\n\nif __name__ == '__main__':\n    connection, cursor = connect_to_database()\n\n    if connection and cursor:\n        create_table(cursor)\n        insert_data(cursor)\n        data = fetch_data(cursor)\n\n        for row in data:\n            print(row)\n\n        connection.commit()  # Save changes\n        connection.close()\n    else:\n        print(\"Failed to connect, exiting\")\n\n    # Example of how to display in PyQt\n    app = QApplication(sys.argv)\n    window = QWidget()\n    window.setWindowTitle(\"User Data\")\n    layout = QVBoxLayout()\n\n    if connection and cursor: # check again if connection ok before showing.\n      data = fetch_data(cursor) #fetch again because connection has been closed\n      for row in data:\n          label = QLabel(f\"ID: {row[0]}, Name: {row[1]}, Email: {row[2]}\")\n          layout.addWidget(label)\n\n    window.setLayout(layout)\n    window.show()\n\n    sys.exit(app.exec_())\n<\/code><\/pre>\n<p>This code snippet demonstrates:<\/p>\n<ul>\n<li>Connecting to an SQLite database named &#8216;mydatabase.db&#8217;.<\/li>\n<li>Creating a &#8216;users&#8217; table if it doesn&#8217;t exist.<\/li>\n<li>Inserting sample data into the table.<\/li>\n<li>Fetching all rows from the &#8216;users&#8217; table and printing them to the console.<\/li>\n<li>Displaying the data using simple PyQt labels in a window.<\/li>\n<\/ul>\n<h2>Integrating Database Operations into PyQt GUI \ud83d\udca1<\/h2>\n<p>The real magic happens when you integrate database operations into your PyQt GUI. Let&#8217;s create a simple form to add new users to the database.  This greatly enhances the use of <strong>PyQt database application development<\/strong>.<\/p>\n<pre><code class=\"language-python\">\nimport sys\nimport sqlite3\nfrom PyQt5.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QPushButton, QVBoxLayout, QMessageBox\n\nclass AddUserForm(QWidget):\n    def __init__(self):\n        super().__init__()\n        self.setWindowTitle(\"Add New User\")\n\n        self.name_label = QLabel(\"Name:\")\n        self.name_input = QLineEdit()\n\n        self.email_label = QLabel(\"Email:\")\n        self.email_input = QLineEdit()\n\n        self.add_button = QPushButton(\"Add User\")\n        self.add_button.clicked.connect(self.add_user)\n\n        self.layout = QVBoxLayout()\n        self.layout.addWidget(self.name_label)\n        self.layout.addWidget(self.name_input)\n        self.layout.addWidget(self.email_label)\n        self.layout.addWidget(self.email_input)\n        self.layout.addWidget(self.add_button)\n\n        self.setLayout(self.layout)\n\n        self.connection, self.cursor = self.connect_to_database()\n        if not self.connection or not self.cursor:\n            QMessageBox.critical(self, \"Error\", \"Failed to connect to the database.\")\n            sys.exit()\n\n\n    def connect_to_database(self):\n        try:\n            connection = sqlite3.connect('mydatabase.db')  # Replace with your database name\n            cursor = connection.cursor()\n            return connection, cursor\n        except sqlite3.Error as e:\n            print(f\"Error connecting to database: {e}\")\n            return None, None\n\n    def add_user(self):\n        name = self.name_input.text()\n        email = self.email_input.text()\n\n        if not name or not email:\n            QMessageBox.warning(self, \"Warning\", \"Please enter both name and email.\")\n            return\n\n        try:\n            self.cursor.execute(\"INSERT INTO users (name, email) VALUES (?, ?)\", (name, email))\n            self.connection.commit()\n            QMessageBox.information(self, \"Success\", \"User added successfully!\")\n            self.name_input.clear()\n            self.email_input.clear()\n        except sqlite3.Error as e:\n            QMessageBox.critical(self, \"Error\", f\"Error adding user: {e}\")\n\n\n    def closeEvent(self, event):\n      if self.connection:\n        self.connection.close()\n\n\nif __name__ == '__main__':\n    app = QApplication(sys.argv)\n    form = AddUserForm()\n    form.show()\n    sys.exit(app.exec_())\n<\/code><\/pre>\n<p>This example creates a simple form with name and email input fields.  When the &#8220;Add User&#8221; button is clicked, the data is inserted into the &#8216;users&#8217; table.  Error handling is included to catch invalid input or database errors.<\/p>\n<h2>Data Visualization with PyQtGraph \u2705<\/h2>\n<p>PyQt can be combined with PyQtGraph, a powerful graphics and plotting library, to create stunning data visualizations. Imagine plotting sales trends, visualizing sensor data, or displaying statistical analyses directly within your desktop application. The possibilities are limitless!<\/p>\n<pre><code class=\"language-python\">\nimport sys\nimport sqlite3\nimport pyqtgraph as pg\nfrom PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout\nimport numpy as np\n\nclass DataVisualization(QWidget):\n    def __init__(self):\n        super().__init__()\n        self.setWindowTitle(\"Data Visualization\")\n\n        self.plot_widget = pg.PlotWidget()\n\n        self.layout = QVBoxLayout()\n        self.layout.addWidget(self.plot_widget)\n        self.setLayout(self.layout)\n\n        self.connection, self.cursor = self.connect_to_database()\n        if not self.connection or not self.cursor:\n            print(\"Failed to connect to the database\")\n            sys.exit()\n\n        self.load_and_plot_data()\n\n    def connect_to_database(self):\n        try:\n            connection = sqlite3.connect('mydatabase.db')\n            cursor = connection.cursor()\n            return connection, cursor\n        except sqlite3.Error as e:\n            print(f\"Error connecting to database: {e}\")\n            return None, None\n\n\n    def load_and_plot_data(self):\n        try:\n            self.cursor.execute(\"SELECT id, RANDOM() * 100 FROM users\") #Use Random to simulate some plot data for each user id\n            data = self.cursor.fetchall()\n            x = [row[0] for row in data]\n            y = [row[1] for row in data]\n            self.plot_widget.plot(x, y, pen='r', symbol='o') #Plot user id vs random data\n\n        except sqlite3.Error as e:\n            print(f\"Error fetching data: {e}\")\n\n    def closeEvent(self, event):\n        if self.connection:\n          self.connection.close()\n\nif __name__ == '__main__':\n    app = QApplication(sys.argv)\n    window = DataVisualization()\n    window.show()\n    sys.exit(app.exec_())\n<\/code><\/pre>\n<p>This example loads data from the &#8216;users&#8217; table (specifically, user IDs) and plots them against random values using PyQtGraph.  This creates a scatter plot showing a basic representation of data visualization. You can adapt this to plot any data you have in your database.<\/p>\n<h2>FAQ \u2753<\/h2>\n<h3>How do I handle different database types (MySQL, PostgreSQL) with PyQt?<\/h3>\n<p>You&#8217;ll need to install the appropriate Python database connector (e.g., <code>psycopg2<\/code> for PostgreSQL, <code>mysql-connector-python<\/code> for MySQL).  Then, modify your connection code to use the correct connection parameters for that database. The core SQL query logic remains largely the same, ensuring you are following industry best practices for <strong>PyQt database application development<\/strong>.<\/p>\n<h3>How can I prevent SQL injection vulnerabilities in my PyQt application?<\/h3>\n<p>Always use parameterized queries (also known as prepared statements). This prevents malicious users from injecting arbitrary SQL code into your queries. Instead of directly embedding user input into the SQL string, pass the input as parameters to the database driver, which will properly escape and sanitize the values. This is crucial for the security of your <strong>PyQt database application development<\/strong> projects.<\/p>\n<h3>What are some strategies for optimizing database performance in PyQt applications?<\/h3>\n<p>Use indexes on frequently queried columns to speed up data retrieval.  Optimize your SQL queries for efficiency. Batch operations (e.g., inserting multiple rows at once) can significantly improve performance. Caching frequently accessed data can also reduce database load. Furthermore, proper database design and normalization contribute to optimized data retrieval which is the foundation of reliable <strong>PyQt database application development<\/strong>.<\/p>\n<h2>Conclusion<\/h2>\n<p>Building data-driven desktop applications with PyQt and databases opens up a world of possibilities. From simple data entry forms to complex data visualization dashboards, PyQt provides the tools you need to create powerful and user-friendly applications.  Remember to focus on clear GUI design, robust error handling, and secure database practices to build high-quality applications.  With a solid understanding of <strong>PyQt database application development<\/strong>, you can create applications that meet the specific needs of your users and unlock the potential of your data. Start experimenting, building, and iterating \u2013 the possibilities are endless!<\/p>\n<h3>Tags<\/h3>\n<p>    PyQt, Database, Desktop Application, Python, SQL<\/p>\n<h3>Meta Description<\/h3>\n<p>    Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building Data-Driven Desktop Applications with PyQt and Databases \ud83c\udfaf Executive Summary Dive into the world of PyQt database application development. This guide provides a practical roadmap for building robust desktop applications that seamlessly integrate with databases. We&#8217;ll explore PyQt&#8217;s powerful GUI framework, learn how to connect to various database systems (such as SQLite, PostgreSQL, and [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[260],"tags":[511,497,1554,274,1534,273,1503,12,1522,1124],"class_list":["post-462","post","type-post","status-publish","format-standard","hentry","category-python","tag-data-visualization","tag-database","tag-desktop-application","tag-development","tag-gui","tag-programming","tag-pyqt","tag-python","tag-qt","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.0 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Building Data-Driven Desktop Applications with PyQt and Databases - Developers Heaven<\/title>\n<meta name=\"description\" content=\"Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building Data-Driven Desktop Applications with PyQt and Databases\" \/>\n<meta property=\"og:description\" content=\"Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/\" \/>\n<meta property=\"og:site_name\" content=\"Developers Heaven\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-14T01:59:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/via.placeholder.com\/600x400?text=Building+Data-Driven+Desktop+Applications+with+PyQt+and+Databases\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/\",\"url\":\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/\",\"name\":\"Building Data-Driven Desktop Applications with PyQt and Databases - Developers Heaven\",\"isPartOf\":{\"@id\":\"https:\/\/developers-heaven.net\/blog\/#website\"},\"datePublished\":\"2025-07-14T01:59:38+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.\",\"breadcrumb\":{\"@id\":\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developers-heaven.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building Data-Driven Desktop Applications with PyQt and Databases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developers-heaven.net\/blog\/#website\",\"url\":\"https:\/\/developers-heaven.net\/blog\/\",\"name\":\"Developers Heaven\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developers-heaven.net\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Building Data-Driven Desktop Applications with PyQt and Databases - Developers Heaven","description":"Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/","og_locale":"en_US","og_type":"article","og_title":"Building Data-Driven Desktop Applications with PyQt and Databases","og_description":"Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.","og_url":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/","og_site_name":"Developers Heaven","article_published_time":"2025-07-14T01:59:38+00:00","og_image":[{"url":"https:\/\/via.placeholder.com\/600x400?text=Building+Data-Driven+Desktop+Applications+with+PyQt+and+Databases","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/","url":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/","name":"Building Data-Driven Desktop Applications with PyQt and Databases - Developers Heaven","isPartOf":{"@id":"https:\/\/developers-heaven.net\/blog\/#website"},"datePublished":"2025-07-14T01:59:38+00:00","author":{"@id":""},"description":"Unlock the power of PyQt and databases! Learn to build dynamic desktop apps with our comprehensive guide. Master PyQt database application development today.","breadcrumb":{"@id":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developers-heaven.net\/blog\/building-data-driven-desktop-applications-with-pyqt-and-databases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developers-heaven.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Building Data-Driven Desktop Applications with PyQt and Databases"}]},{"@type":"WebSite","@id":"https:\/\/developers-heaven.net\/blog\/#website","url":"https:\/\/developers-heaven.net\/blog\/","name":"Developers Heaven","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developers-heaven.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/posts\/462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/comments?post=462"}],"version-history":[{"count":0,"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/posts\/462\/revisions"}],"wp:attachment":[{"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/media?parent=462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/categories?post=462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers-heaven.net\/blog\/wp-json\/wp\/v2\/tags?post=462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}