{"id":16975581,"url":"https://github.com/superzombi/py-simple-db","last_synced_at":"2026-04-18T17:03:34.569Z","repository":{"id":62592566,"uuid":"507633144","full_name":"SuperZombi/Py-Simple-DB","owner":"SuperZombi","description":"Simple json database","archived":false,"fork":false,"pushed_at":"2023-01-26T18:40:33.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T11:35:40.794Z","etag":null,"topics":["database","json","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/PySimpleDB/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuperZombi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-26T16:57:16.000Z","updated_at":"2022-06-27T09:14:59.000Z","dependencies_parsed_at":"2023-02-14T21:00:59.722Z","dependency_job_id":null,"html_url":"https://github.com/SuperZombi/Py-Simple-DB","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FPy-Simple-DB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FPy-Simple-DB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FPy-Simple-DB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FPy-Simple-DB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuperZombi","download_url":"https://codeload.github.com/SuperZombi/Py-Simple-DB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244868764,"owners_count":20523592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","json","python"],"created_at":"2024-10-14T01:23:13.411Z","updated_at":"2026-04-18T17:03:34.539Z","avatar_url":"https://github.com/SuperZombi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Py-Simple-DB\n\n\u003cimg src=\"https://shields.io/badge/version-v0.2.0-blue\"\u003e\n\n## \u003ca href=\"https://pypi.org/project/PySimpleDB/\"\u003eInstall\u003c/a\u003e:\n```\npip install PySimpleDB\n```\n\n## Load:\n```python\nfrom PySimpleDB import DataBase\n\nmydb = DataBase(\"simple.bd\")\nmydb_unique = DataBase(\"unique.bd\", unique=\"user\")\n```\n\nYou can use a database in which the unique key will be a number, or specify your own name for the unique key, which will need to be transmitted\n\n## Add row:\nThis command automatically saves the state of the database.\n```python\nmydb.add(name=\"Hello\", last_name=\"world\", gender=\"male\") # any values\nmydb_unique.add(user=\"User1\", name=\"Hello world\", gender=\"male\") # any values\n#               ^ unique key\n```\nMake sure you are passing in a unique key for the appropriate database. \u003cbr\u003e\nAs in this example, the unique key is the \"user\" argument specified during initialization.\n\n\n## Find:\nReturns the id of the first matched element, or an array of ids.\n```python\nid_first = mydb.find(name=\"Hello\")           # 0\nid_array = mydb.find_all(gender=\"male\")      # [0...]\n```\n```python\nid_first_unique = mydb_unique.find(gender=\"male\")           # \"User1\"\nid_array_unique = mydb_unique.find_all(gender=\"male\")       # [\"User1\"...]\n```\n\n## Get row:\nReturns value by id.\n```python\nmydb.get(id_first)               # {\"name\": \"Hello\", \"last_name\": \"world\", \"gender\": \"male\"}\nmydb_unique.get(id_first_unique) # {\"name\": \"Hello world\", \"gender\": \"male\"}\n```\n\n## Delete row:\nThis command automatically saves the state of the database.\n```python\nmydb.delete(id_first)\nmydb_unique.delete(id_first_unique)\n```\n\n## Save:\n```python\nmydb.save()\n```\n\n## Get All Data:\nAllows you to get the whole database.\n```python\nmydb.get_all()\n```\nor\n```python\nmydb.data\n```\n\n\u003cbr\u003e\n\n## You can also see usage examples \u003ca href=\"examples/\"\u003ehere\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzombi%2Fpy-simple-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperzombi%2Fpy-simple-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzombi%2Fpy-simple-db/lists"}