{"id":106519,"date":"2021-12-29T11:00:00","date_gmt":"2021-12-29T09:00:00","guid":{"rendered":"https:\/\/examples.javacodegeeks.com\/?p=106519"},"modified":"2021-12-21T11:49:37","modified_gmt":"2021-12-21T09:49:37","slug":"python-sqlite-tutorial","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/","title":{"rendered":"Python SQLite Tutorial"},"content":{"rendered":"<p>Hello in this tutorial, we will explain the SQLite implementation in Python flask.<\/p>\n<h2>1. Introduction<\/h2>\n<p><strong>SQLite<\/strong> is a software library that provides a relational database management system. It is lightweight in terms of setup, database administration, and required resources. It is self-contained, serverless, zero-configuration, transactional.<\/p>\n<ul>\n<li>Self-contained means that it require minimal support from the operating system or any external library<\/li>\n<li>Zero-configuration means that no external installation is required before using it<\/li>\n<li>Transactional means it is fully ACID-compliant i.e. all queries and changes are atomic, consistent, isolated, and durable<\/li>\n<\/ul>\n<h3>1.1 Setting up Python<\/h3>\n<p>If someone needs to go through the Python installation on Windows, please watch <a href=\"https:\/\/www.youtube.com\/watch?v=i-MuSAwgwCU\" target=\"_blank\" rel=\"noopener\">this<\/a> link. You can download the Python from <a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"noopener\">this<\/a> link.<\/p>\n<h2>2. Python SQLite Tutorial<\/h2>\n<p>I am using <a href=\"https:\/\/www.jetbrains.com\/pycharm\/\" target=\"_blank\" rel=\"noopener\">JetBrains PyCharm<\/a> as my preferred IDE. You&#8217;re free to choose the IDE of your choice. Fig. 1 represents the project structure for this tutorial.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/12\/python-sqlite-projectstructure-guide-img1.jpg\"><img decoding=\"async\" width=\"348\" height=\"146\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/12\/python-sqlite-projectstructure-guide-img1.jpg\" alt=\"python SQLite - app structure\" class=\"wp-image-106520\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/12\/python-sqlite-projectstructure-guide-img1.jpg 348w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/12\/python-sqlite-projectstructure-guide-img1-300x126.jpg 300w\" sizes=\"(max-width: 348px) 100vw, 348px\" \/><\/a><figcaption>Fig. 1: Application structure<\/figcaption><\/figure>\n<\/div>\n<p>The file named &#8211; <code>songs.db<\/code> will be generated dynamically during the application run.<\/p>\n<h3>2.1 Creating a requirements file<\/h3>\n<p>Add the below code to the requirements file. The file will be responsible to download and install the packages required for this tutorial.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>requirements.txt<\/em><\/span><\/p>\n<pre class=\"brush:plain;\">Faker==10.0.0\nFlask==1.1.4\n<\/pre>\n<h3>2.2 Creating the database config<\/h3>\n<p>Create the database configuration file. The file will be responsible for handling the SQLite database connection and interacting with the <code>songs<\/code> database.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>db.py<\/em><\/span><\/p>\n<pre class=\"brush:python;\">import sqlite3\nfrom sqlite3 import Error\n\nDATABASE_NAME = \"songs.db\"\n\n\ndef get_db():\n    \"\"\" create a database connection to a SQLite database \"\"\"\n    try:\n        conn = sqlite3.connect(DATABASE_NAME)\n        return conn\n    except Error as e:\n        print(e)\n\n\ndef create_table():\n    tables = [\n        \"\"\"\n        CREATE TABLE IF NOT EXISTS songs(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, singer TEXT NOT NULL)\n        \"\"\"\n    ]\n    db = get_db()\n    cursor = db.cursor()\n    for table in tables:\n        cursor.execute(table)\n<\/pre>\n<h3>2.3 Creating the controller class<\/h3>\n<p>Create the controller class responsible for interacting with the database. The controller class methods are responsible for performing the SQL CRUD operations.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline;\"><em>controller.py<\/em><\/span><\/p>\n<pre class=\"brush:python;\">from db import get_db\n\n\ndef get_row_count():\n    return len(get_all())\n\n\ndef insert_song(name, singer):\n    db = get_db()\n    cursor = db.cursor()\n    sql = \"INSERT INTO songs(name, singer) VALUES (?, ?)\"\n    cursor.execute(sql, [name, singer])\n    db.commit()\n    return True\n\n\ndef get_by_id(key):\n    db = get_db()\n    cursor = db.cursor()\n    sql = \"SELECT id, name, singer FROM songs WHERE id = ?\"\n    cursor.execute(sql, [key])\n    return cursor.fetchone()\n\n\ndef get_all():\n    db = get_db()\n    cursor = db.cursor()\n    sql = \"SELECT id, name, singer FROM songs\"\n    cursor.execute(sql)\n    return cursor.fetchall()\n\n\ndef delete_by_id(key):\n    db = get_db()\n    cursor = db.cursor()\n\n    item = get_by_id(key)\n    if item is None:\n        return False\n\n    sql = \"DELETE FROM songs WHERE id = ?\"\n    cursor.execute(sql, [key])\n    db.commit()\n    return True\n\n\ndef update_by_id(key, name, singer):\n    db = get_db()\n    cursor = db.cursor()\n\n    item = get_by_id(key)\n    if item is None:\n        return False\n\n    sql = \"UPDATE songs SET name = ?, singer = ? WHERE id = ?\"\n    cursor.execute(sql, [name, singer, key])\n    db.commit()\n    return True\n<\/pre>\n<h3>2.4 Creating the application class<\/h3>\n<p>Create the main class responsible for handling the incoming requests from the client and interact with the database to show the results.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>main.py<\/em><\/span><\/p>\n<pre class=\"brush:python;\">from faker import Faker\nfrom flask import Flask, jsonify, request\n\nimport controller\nfrom db import create_table\n\napp = Flask(__name__)\nfaker = Faker()\n\nRESOURCE_NOT_FOUND = \"RESOURCE_NOT_FOUND\"\n\n\n# http get endpoint= http:\/\/localhost:8000\/song\/all\n@app.route(\"\/song\/all\", methods=[\"GET\"])\ndef get_all():\n    songs = controller.get_all()\n    items = []\n    for song in songs:\n        items.append({\"id\": song[0], \"name\": song[1], \"singer\": song[2]})\n\n    return jsonify({\"songs\": items})\n\n\n# http get endpoint= http:\/\/localhost:8000\/song\/1\n@app.route(\"\/song\/\", methods=[\"GET\"])\ndef get_by_id(key):\n    song = controller.get_by_id(key)\n    if song is None:\n        return jsonify({\"msg\": RESOURCE_NOT_FOUND})\n\n    return jsonify({\"id\": song[0], \"name\": song[1], \"singer\": song[2]})\n\n\n# http delete endpoint= http:\/\/localhost:8000\/song\/1\n@app.route(\"\/song\/\", methods=[\"DELETE\"])\ndef delete_by_id(key):\n    result = controller.delete_by_id(key)\n    if not result:\n        return jsonify({\"msg\": RESOURCE_NOT_FOUND})\n\n    return jsonify(result)\n\n\n# http put endpoint= http:\/\/localhost:8000\/song\/1\n@app.route(\"\/song\/\", methods=[\"PUT\"])\ndef update_by_id(key):\n    details = request.get_json()\n    name = details[\"name\"]\n    singer = details[\"singer\"]\n    result = controller.update_by_id(key, name, singer)\n    if not result:\n        return jsonify({\"msg\": RESOURCE_NOT_FOUND})\n\n    return jsonify(result)\n\n\nif __name__ == '__main__':\n    create_table()\n    print(\"Table created\")\n\n    if controller.get_row_count() == 0:\n        for x in range(1, 6):\n            controller.insert_song(faker.word(), faker.name())\n\n        print(\"Sample records inserted\")\n    else:\n        print(\"Skipping insert\")\n\n    app.run(host=\"localhost\", port=8000, debug=False)\n<\/pre>\n<h2>3. Run the application<\/h2>\n<p>Run the <code>main.py<\/code> python script once the code is completed and if everything goes well the application will be started on the port number &#8211; <code>8000<\/code> as shown in the below logs.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>Application logs<\/em><\/span><\/p>\n<pre class=\"brush:plain;\">Table created\nSkipping insert\n * Serving Flask app \"main\" (lazy loading)\n * Environment: production\n   WARNING: This is a development server. Do not use it in a production deployment.\n   Use a production WSGI server instead.\n * Debug mode: off\n * Running on http:\/\/localhost:8000\/ (Press CTRL+C to quit)\n<\/pre>\n<h2>4. Demo<\/h2>\n<p>To play around with the application endpoints open up the <a href=\"https:\/\/www.postman.com\/\" target=\"_blank\" rel=\"noopener\">postman<\/a> tool and hit the endpoints.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>Application endpoints<\/em><\/span><\/p>\n<pre class=\"brush:plain;\">-- get all songs\n-- http get method\nhttp:\/\/localhost:8000\/song\/all\n\n-- get a song by id\n-- http get method\nhttp:\/\/localhost:8000\/song\/1\n\n-- delete song by id\n-- http delete method\nhttp:\/\/localhost:8000\/song\/1\n\n-- update song by id\n-- http put method\nhttp:\/\/localhost:8000\/song\/1\n<\/pre>\n<p>That is all for this tutorial and I hope the article served you with whatever you were looking for. Happy Learning and do not forget to share!<\/p>\n<h2>5. Summary<\/h2>\n<p>In this tutorial, we learned about SQLite implementation in a python application. You can download the source code of this tutorial from the <a href=\"#projectDownload\">Downloads<\/a> section.<\/p>\n<h2><a name=\"projectDownload\"><\/a>6. Download the Project<\/h2>\n<p>This was a tutorial on how to implement CRUD operations using SQLite in Python applications.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>You can download the full source code of this example here: <a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/12\/Python-SQLite-Tutorial.zip\"><strong>Python SQLite Tutorial<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational database management system. It is lightweight in terms of setup, database administration, and required resources. It is self-contained, serverless, zero-configuration, transactional. Self-contained means that it require minimal support from the operating &hellip;<\/p>\n","protected":false},"author":119,"featured_media":99891,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46689],"tags":[1055,1728],"class_list":["post-106519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-sql","tag-sqlite"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python SQLite Tutorial - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python SQLite Tutorial - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-29T09:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yatin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yatin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\"},\"author\":{\"name\":\"Yatin\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13\"},\"headline\":\"Python SQLite Tutorial\",\"datePublished\":\"2021-12-29T09:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\"},\"wordCount\":414,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"keywords\":[\"sql\",\"sqlite\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\",\"name\":\"Python SQLite Tutorial - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"datePublished\":\"2021-12-29T09:00:00+00:00\",\"description\":\"Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"set python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/web-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/web-development\/python\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Python SQLite Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13\",\"name\":\"Yatin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg\",\"caption\":\"Yatin\"},\"description\":\"An experience full-stack engineer well versed with Core Java, Spring\/Springboot, MVC, Security, AOP, Frontend (Angular &amp; React), and cloud technologies (such as AWS, GCP, Jenkins, Docker, K8).\",\"sameAs\":[\"https:\/\/www.javacodegeeks.com\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/yatin-batra\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python SQLite Tutorial - Java Code Geeks","description":"Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational","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:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Python SQLite Tutorial - Java Code Geeks","og_description":"Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational","og_url":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2021-12-29T09:00:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","type":"image\/jpeg"}],"author":"Yatin","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Yatin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/"},"author":{"name":"Yatin","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13"},"headline":"Python SQLite Tutorial","datePublished":"2021-12-29T09:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/"},"wordCount":414,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","keywords":["sql","sqlite"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/","url":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/","name":"Python SQLite Tutorial - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","datePublished":"2021-12-29T09:00:00+00:00","description":"Hello in this tutorial, we will explain the SQLite implementation in Python flask. 1. Introduction SQLite is a software library that provides a relational","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","width":150,"height":150,"caption":"set python"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/python-sqlite-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/examples.javacodegeeks.com\/category\/web-development\/"},{"@type":"ListItem","position":3,"name":"Python","item":"https:\/\/examples.javacodegeeks.com\/category\/web-development\/python\/"},{"@type":"ListItem","position":4,"name":"Python SQLite Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13","name":"Yatin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg","caption":"Yatin"},"description":"An experience full-stack engineer well versed with Core Java, Spring\/Springboot, MVC, Security, AOP, Frontend (Angular &amp; React), and cloud technologies (such as AWS, GCP, Jenkins, Docker, K8).","sameAs":["https:\/\/www.javacodegeeks.com"],"url":"https:\/\/examples.javacodegeeks.com\/author\/yatin-batra\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/106519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/119"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=106519"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/106519\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/99891"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=106519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=106519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=106519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}