{"id":51590589,"url":"https://github.com/bentimor/dicsql","last_synced_at":"2026-07-11T14:03:10.388Z","repository":{"id":62568083,"uuid":"279065692","full_name":"BenTimor/DicSQL","owner":"BenTimor","description":"SimpleSQL is a SQL library for python which allows you to use database as a dictionary. ","archived":false,"fork":false,"pushed_at":"2020-07-25T08:40:22.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-30T09:25:17.501Z","etag":null,"topics":["database","dictionary","mysql","python","python3","serialization","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenTimor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-12T13:03:16.000Z","updated_at":"2020-12-07T05:43:26.000Z","dependencies_parsed_at":"2022-11-03T16:30:35.827Z","dependency_job_id":null,"html_url":"https://github.com/BenTimor/DicSQL","commit_stats":null,"previous_names":["drbenana/dicsql"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/BenTimor/DicSQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenTimor%2FDicSQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenTimor%2FDicSQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenTimor%2FDicSQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenTimor%2FDicSQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenTimor","download_url":"https://codeload.github.com/BenTimor/DicSQL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenTimor%2FDicSQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35364269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","dictionary","mysql","python","python3","serialization","sql"],"created_at":"2026-07-11T14:03:09.598Z","updated_at":"2026-07-11T14:03:10.373Z","avatar_url":"https://github.com/BenTimor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DicSQL\nDicSQL does a very simple job. It lets you to use MySQL database like it was a dictionary ('HashMap' of python).\n## Requirements\n- Python 3.5+\n- pymysql\n- pickle\n## Installation\n    pip install DicSQL\n\n## Basic Tutorial\n### First of all, You have to connect  to the database\n\n    from DicSQL import DataBase\n\n    database = DataBase(\n\t    \"host\",\n\t    \"username\",\n\t    \"password\",\n\t    \"database\"\n\t)\n### Get the table you want to modify\n\n    table = database[\"table\"]\n**Note:** Every table automatically has an id column.\n### Set information to a column\n\n    table[\"column1\"] = \"blah blah blah\"\nThe column is created automatically!\n\n**Note:** Every time you use it, it **inserts** a new value, not replaces it. It doesn't remove the old values.\n### And multiple columns...\n\n    table[\"column1, column2\"] = \"blah blah\", \"blah\"\nThe both values are going to be in the same row.\n### Update an existing value\n\n    table[\"column1\", \"WHERE column2='something'\"] = \"Another blah\"\n### Removing value\n\n    del table[\"column1\"] # Removes all the values in the column\n    del table[\"column1\", \"WHERE column2='something'] # Removes all the values where the WHERE returns true\n\n### Getting values\nFirst, you have to know that the values comes as a SQL-like data.\nBasically, It returns a list of all of the results. Every result is a list that contains all of the values you asked for.\n\n**Code example:**\n\n    print(table[\"column1, column2\"])\n\n**Output example**\n\n    [[\"Column1 Info (Row 1)\", \"Column2 Info (Row 1)\"], [\"Column1 Info (Row 2)\", \"Column2 Info (Row 2)\"]...]\n\n\nYou can also specify additional statements for better selection of values. **For example:**\n\n    table[\"column1, column2\", \"WHERE column3='NODER'\"]\n\n## Serialization Tutorial\nThis library can auto-serialize your data. If you want that to happen, You just have to give your table another parameter.\n\n    serializable_table = database[\"table\", True]\nAnd from here you can use it as a normal table. You can insert, update and read objects.\n### Inserting Example\n\n    serializable_table[\"myobject\"] = MyObject(1,2)\n### Reading Example\n\n    myobject = serializable_table[\"myobject\"]\n    print(myobject.sum())\n    # Output \u003e 3\n**A BIG NOTE:** You cannot use the 'remove' function on this type of table. If you want to remove a serializabled object, use a normal table for that mission.\n## Notes\n- Everything is saved as a String on the table if you use DicSQL.\n- This library creates and removes tables and columns automatically. **You don't have to decide what your table looks like** or what tables you want to create. Just use it and the library will do everything for you.\n- You can specify to the DataBase object another default value for the database. You can do it by adding to its parameters `NONE=\"Something\"`\n- This library is great for personal use and small-data. But can be a little slow for big-data projects. I recommend you to understand what's going on its files before you use it.\n\nHave a great day.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentimor%2Fdicsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentimor%2Fdicsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentimor%2Fdicsql/lists"}