{"id":21900533,"url":"https://github.com/keenlycode/shelfdb","last_synced_at":"2025-07-30T07:07:38.793Z","repository":{"id":57466701,"uuid":"77901602","full_name":"keenlycode/shelfdb","owner":"keenlycode","description":"A tiny documents database for Python","archived":false,"fork":false,"pushed_at":"2023-08-17T16:05:30.000Z","size":3636,"stargazers_count":37,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T03:37:32.369Z","etag":null,"topics":["asyncio","database","nosql","python"],"latest_commit_sha":null,"homepage":"https://keenlycode.github.io/shelfdb/","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/keenlycode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-03T09:14:34.000Z","updated_at":"2025-07-01T15:50:47.000Z","dependencies_parsed_at":"2023-11-07T18:29:31.840Z","dependency_job_id":"b77b7f54-47fa-402e-85de-54aa3a3c066e","html_url":"https://github.com/keenlycode/shelfdb","commit_stats":null,"previous_names":["keenlycode/shelfdb","nitipit/shelfdb"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/keenlycode/shelfdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlycode%2Fshelfdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlycode%2Fshelfdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlycode%2Fshelfdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlycode%2Fshelfdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keenlycode","download_url":"https://codeload.github.com/keenlycode/shelfdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlycode%2Fshelfdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267827502,"owners_count":24150350,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"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":["asyncio","database","nosql","python"],"created_at":"2024-11-28T15:08:39.052Z","updated_at":"2025-07-30T07:07:38.751Z","avatar_url":"https://github.com/keenlycode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shelf DB\n\u003cimg src=\"https://raw.githubusercontent.com/nitipit/shelfdb/master/docs/shelf.png\" style=\"max-width: 400px;\"\u003e\n\n## Introduction\n**Shelf DB** is a tiny document database for Python to stores **documents** or **JSON**-like data.\n\n## Get it\n```shell\n$ pip install shelfdb shelfquery\n```\n\n## Start asyncio server\n```shell\n$ shelfdb\nServing on ('127.0.0.1', 17000)\nDatabase : db\npid : 12359\n```\n\n\u003e \u003cbits-tag\u003euvloop\u003c/bits-tag\u003e built-in already to make it faster. See [uvloop](https://github.com/MagicStack/uvloop).\n\n## Sync/Async query client through network.\n```python\nimport shelfquery\n\n# Sync client point to 127.0.0.1:17000\ndb = shelfquery.db()\n\n# Make it async client\ndb.asyncio()\n\n# Make it sync client again\ndb.sync()\n```\n\n## Store data\n```python\ndb.shelf('note').insert({\n    'title': 'Shelf DB',\n    'content': 'Simple note',\n    'datetime': datetime.utcnow()})\n```\n\n## Flexible query API with similar syntax\n```python\ndb.shelf('note')\\\n    .filter(lambda note:\n        note['title'] == 'Shelf DB')\\\n    .sort(key=lambda note: note['datetime'])\n    .run()\n```\nNo need to learn more syntax. Let's just query using `filter`, `slice`, `sort`, `map`, `reduce` which almost the same to Python built-in functions.\n\n## Regular expression\nPython reqular expression `re` can be use inside query function\n```python\nimport re\ndb.shelf('note')\\\n    .filter(lambda note:\n        re.match(r'.*DB$', note['title']))\\\n    .run()\n```\n\n\u003ch2 style=\"display: inline-block; width: auto; margin-bottom: 0;\"\u003eTiny\u003c/h2\u003e\n\u003cspan style=\"vertical-align: text-bottom;\"\u003e\n    \u003cbits-tag class=\"bg-c\"\u003eshelfdb ~ 12kB\u003c/bits-tag\u003e\n    \u003cbits-tag class=\"bg-c\"\u003eshelfquery ~ 4kB\u003c/bits-tag\u003e\n\u003c/span\u003e\n\nRuntime code is small, easy to install. \u003cbits-tag\u003eShelf DB\u003c/bits-tag\u003e also works on **Raspberry Pi**.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenlycode%2Fshelfdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeenlycode%2Fshelfdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenlycode%2Fshelfdb/lists"}