{"id":18021160,"url":"https://github.com/filipporomani/securedb","last_synced_at":"2025-10-15T11:32:26.993Z","repository":{"id":57465176,"uuid":"439067939","full_name":"filipporomani/securedb","owner":"filipporomani","description":"securedb is a fast and lightweight Python framework to use encrypted JSON databases.","archived":false,"fork":false,"pushed_at":"2024-10-03T17:46:03.000Z","size":47,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-20T14:22:54.781Z","etag":null,"topics":["encrypted","encryption","json","python-library"],"latest_commit_sha":null,"homepage":"https://github.com/filipporomani/securedb","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipporomani.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-16T17:07:36.000Z","updated_at":"2024-06-26T01:41:30.000Z","dependencies_parsed_at":"2024-10-30T06:49:28.783Z","dependency_job_id":null,"html_url":"https://github.com/filipporomani/securedb","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/filipporomani/securedb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipporomani%2Fsecuredb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipporomani%2Fsecuredb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipporomani%2Fsecuredb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipporomani%2Fsecuredb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipporomani","download_url":"https://codeload.github.com/filipporomani/securedb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipporomani%2Fsecuredb/sbom","scorecard":{"id":399680,"data":{"date":"2025-08-11","repo":{"name":"github.com/filipporomani/securedb","commit":"bbdd53a44d228a7c136c455fbd888fb18dfb1b68"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T19:49:08.566Z","repository_id":57465176,"created_at":"2025-08-18T19:49:08.566Z","updated_at":"2025-08-18T19:49:08.566Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279076726,"owners_count":26098226,"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-10-15T02:00:07.814Z","response_time":56,"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":["encrypted","encryption","json","python-library"],"created_at":"2024-10-30T06:08:56.608Z","updated_at":"2025-10-15T11:32:26.976Z","avatar_url":"https://github.com/filipporomani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003esecuredb\u003c/h1\u003e\n\n[![Downloads](https://static.pepy.tech/personalized-badge/securedb?period=total\u0026units=none\u0026left_color=grey\u0026right_color=blue\u0026left_text=Downloads)](https://pypi.org/project/securedb) [![PyPi version](https://badgen.net/pypi/v/securedb/)](https://pypi.org/project/securedb) [![PyPI status](https://img.shields.io/pypi/status/securedb.svg)](https://pypi.python.org/pypi/securedb/)\n\n\n## securedb is a lightweight Python database framework to handle basic key-value encrypted data.\n## `pip install securedb --upgrade`\n\n\n## Content index\n\n- [Changelog](#changelog)\n  - [New in 2.0.3 (Latest)](#new-in-203-latest)\n  - [New in 2.0.2](#new-in-202)\n  - [New in 2.0.1](#new-in-201)\n  - [New in 2.0.0](#new-in-200)\n  - [New in 1.1.0](#new-in-110)\n- [Documentation](#documentation)\n  - [DB Creation](#db-creation)\n    - [Key](#key)\n    - [Initialization](#initialization)\n  - [Writing keys](#writing-keys)\n    - [write()](#write)\n    - [write\\_many()](#write_many)\n  - [Deleting](#deleting)\n    - [delete()](#delete)\n    - [delete\\_many()](#delete_many)\n    - [clear()](#clear)\n  - [Reading](#reading)\n    - [get()](#get)\n    - [get\\_many()](#get_many)\n\n\n# Changelog\n\n## New in 2.0.3 (Latest)\n- Switched to hatch for packaging\n\n## New in 2.0.2\n-  Bugfix in the get_many() function\n-  Pep8 compliant\n-  Fixes in the docs\n## New in 2.0.1\n-  Fixed docs missing initialization instructions\n\n## New in 2.0.0\n-  Completely redesigned db schema, now using single files for each database key\n-  Maximum database storage size heavily increased\n-  Lower memory consumption\n-  Mapped every possible error\n-  Custom key file path\n\n## New in 1.1.0\n-  `force` kwarg added in the initialization; see [initialization](#Initialization)\n-  You don't need to manually encode the key during the initialization\n-  If there is no error, all the functions now return `True`\n-  Useless print() functions were removed\n-  Smoother error handling\n\n\n# Documentation\n\n\n\n## DB Creation\n### Key\nTo create a database, an encryption key is needed. To generate it, you can use the built-in `newkey()` function.\n```py\nimport securedb\nsecuredb.newkey(keyfile=\"path/to/key/storage\") # the \"keyfile\" kwarg is optional and default set to \".key\".\n```\nThis will create a new file: it'll be named \".key\" if no `keyfile` is specified, else it'll be named as you want.\nThe key file is the file which contains the encryption key.\n\n\n\n### Initialization\n```py\nimport securedb\n\ndb = securedb.Db(db_path, path_to_key, force=True)\n# path is the database storage location, key is the path to the key file and force is described below.\n```\nWith `force=True` the program will create a new db in the given path if no database is found. `force` is optional and default set to `False`.\nRemember that if you lost your key there will be no way to recover the database content.\n\n\n\n## Writing keys\n### write()\nThe `write(key, value)` function allows you to insert a single value into the database.\n`key` is the value name\n`value` is the value data.\n\n`key` is used to access the data, and must be an integer or a string;\n`value` can be anything such as boolean, integer, string, array, list, dictionary ecc.\n\n### write_many()\nThe `write_many(payload)` function allows you to write many values in a single time. \n`payload` is a dictionary with all the values you need to insert:\n`{key: value, key1: value1, key2: value2}` etc.\nThere isn't any limit regarding the size of the payload. For perfomance reasons, we suggest you to use payloads with a maximum size of 5mb, even if there is no software limit.\n\n\n\n## Deleting\n### delete()\nThe `delete(key)` function allows you to delete a single value from the database.\n`key` is the value's key inside the database (see [write](#writing)) and must be a string or an integer. \n\n### delete_many()\nThe `delete_many(payload)` function allows you to delete many values at the same time.\n`payload` is a list of the keys you want to delete:\n`[key, key1, key2]` etc. \n\n### clear()\nThe `clear()` functions is a dangerous function that allows you to erease the whole database. \nBe careful using it, because this action cannot be undone and the function doesn't ask confirmation before ereasing the database.\n\n\n\n## Reading\n### get()\nTo read any value from the database, you need to use the `get(key)` function.\n`key` is the key of the value you want to read (see [write](#writing)).\n\n### get_many()\nTo read any value from the database, you need to use the `get_many(keys)` function.\n`keys` is a list of the keys you want to read (see [write](#writing)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipporomani%2Fsecuredb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipporomani%2Fsecuredb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipporomani%2Fsecuredb/lists"}