scruby


Namescruby JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryA fast key-value storage library.
upload_time2025-08-27 06:41:02
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.12
licenseNone
keywords database db scruby store
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <p align="center">
    <a href="https://github.com/kebasyaty/scruby">
      <img
        height="90"
        alt="Logo"
        src="https://raw.githubusercontent.com/kebasyaty/scruby/main/assets/logo.svg">
    </a>
  </p>
  <p>
    <h1>Scruby</h1>
    <h3>A fast key-value storage library.</h3>
    <p align="center">
      <a href="https://github.com/kebasyaty/scruby/actions/workflows/test.yml" alt="Build Status"><img src="https://github.com/kebasyaty/scruby/actions/workflows/test.yml/badge.svg" alt="Build Status"></a>
      <a href="https://kebasyaty.github.io/scruby/" alt="Docs"><img src="https://img.shields.io/badge/docs-available-brightgreen.svg" alt="Docs"></a>
      <a href="https://pypi.python.org/pypi/scruby/" alt="PyPI pyversions"><img src="https://img.shields.io/pypi/pyversions/scruby.svg" alt="PyPI pyversions"></a>
      <a href="https://pypi.python.org/pypi/scruby/" alt="PyPI status"><img src="https://img.shields.io/pypi/status/scruby.svg" alt="PyPI status"></a>
      <a href="https://pypi.python.org/pypi/scruby/" alt="PyPI version fury.io"><img src="https://badge.fury.io/py/scruby.svg" alt="PyPI version fury.io"></a>
      <br>
      <a href="https://github.com/kebasyaty/scruby/issues"><img src="https://img.shields.io/github/issues/kebasyaty/scruby.svg" alt="GitHub issues"></a>
      <a href="https://pepy.tech/projects/scruby"><img src="https://static.pepy.tech/badge/scruby" alt="PyPI Downloads"></a>
      <a href="https://github.com/kebasyaty/scruby/blob/main/LICENSE" alt="GitHub license"><img src="https://img.shields.io/github/license/kebasyaty/scruby" alt="GitHub license"></a>
      <a href="https://mypy-lang.org/" alt="Types: Mypy"><img src="https://img.shields.io/badge/types-Mypy-202235.svg?color=0c7ebf" alt="Types: Mypy"></a>
      <a href="https://docs.astral.sh/ruff/" alt="Code style: Ruff"><img src="https://img.shields.io/badge/code%20style-Ruff-FDD835.svg" alt="Code style: Ruff"></a>
      <a href="https://github.com/kebasyaty/scruby" alt="PyPI implementation"><img src="https://img.shields.io/pypi/implementation/scruby" alt="PyPI implementation"></a>
      <br>
      <a href="https://pypi.org/project/scruby"><img src="https://img.shields.io/pypi/format/scruby" alt="Format"></a>
      <a href="https://github.com/kebasyaty/scruby"><img src="https://img.shields.io/github/languages/top/kebasyaty/scruby" alt="Top"></a>
      <a href="https://github.com/kebasyaty/scruby"><img src="https://img.shields.io/github/repo-size/kebasyaty/scruby" alt="Size"></a>
      <a href="https://github.com/kebasyaty/scruby"><img src="https://img.shields.io/github/last-commit/kebasyaty/scruby/main" alt="Last commit"></a>
      <a href="https://github.com/kebasyaty/scruby/releases/" alt="GitHub release"><img src="https://img.shields.io/github/release/kebasyaty/scruby" alt="GitHub release"></a>
    </p>
    <p align="center">
      Scruby is a fast key-value storage library that provides an ordered mapping from string keys to string values.
      <br>
      The library uses fractal-tree addressing.
      <br>
      The maximum size of the database is 16**32=340282366920938463463374607431768211456 branches,
      each branch can store one or more keys.
      <br>
      The value of any key can be obtained in 32 steps, thereby achieving high performance.
      <br>
      There is no need to iterate through all the keys in search of the desired value.
    </p>
  </p>
</div>

## Documentation

Online browsable documentation is available at [https://kebasyaty.github.io/scruby/](https://kebasyaty.github.io/scruby/ "Documentation").

## Requirements

[View the list of requirements](https://github.com/kebasyaty/scruby/blob/v0/REQUIREMENTS.md "Requirements").

## Installation

```shell
uv add scruby
```

## Usage

```python
import anyio
from scruby import Scruby


async def main() -> None:
    """Example."""

    db = Scruby()
    await db.set_key("key name", "Some text")
    await db.get_key("key name")  # => "Some text"
    await db.get_key("key missing")  # => KeyError
    await db.has_key("key name")  # => True
    await db.has_key("key missing")  # => False
    await db.delete_key("key name")
    await db.delete_key("key missing")  # => KeyError
    # Full database deletion.
    await db.napalm()
    await db.napalm()  # => FileNotFoundError


if __name__ == "__main__":
    anyio.run(main)
```

## Changelog

[View the change history](https://github.com/kebasyaty/scruby/blob/v0/CHANGELOG.md "Changelog").

## License

This project is licensed under the [MIT](https://github.com/kebasyaty/scruby/blob/main/LICENSE "MIT").

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "scruby",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "database, db, scruby, store",
    "author": null,
    "author_email": "kebasyaty <kebasyaty@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "<div align=\"center\">\n  <p align=\"center\">\n    <a href=\"https://github.com/kebasyaty/scruby\">\n      <img\n        height=\"90\"\n        alt=\"Logo\"\n        src=\"https://raw.githubusercontent.com/kebasyaty/scruby/main/assets/logo.svg\">\n    </a>\n  </p>\n  <p>\n    <h1>Scruby</h1>\n    <h3>A fast key-value storage library.</h3>\n    <p align=\"center\">\n      <a href=\"https://github.com/kebasyaty/scruby/actions/workflows/test.yml\" alt=\"Build Status\"><img src=\"https://github.com/kebasyaty/scruby/actions/workflows/test.yml/badge.svg\" alt=\"Build Status\"></a>\n      <a href=\"https://kebasyaty.github.io/scruby/\" alt=\"Docs\"><img src=\"https://img.shields.io/badge/docs-available-brightgreen.svg\" alt=\"Docs\"></a>\n      <a href=\"https://pypi.python.org/pypi/scruby/\" alt=\"PyPI pyversions\"><img src=\"https://img.shields.io/pypi/pyversions/scruby.svg\" alt=\"PyPI pyversions\"></a>\n      <a href=\"https://pypi.python.org/pypi/scruby/\" alt=\"PyPI status\"><img src=\"https://img.shields.io/pypi/status/scruby.svg\" alt=\"PyPI status\"></a>\n      <a href=\"https://pypi.python.org/pypi/scruby/\" alt=\"PyPI version fury.io\"><img src=\"https://badge.fury.io/py/scruby.svg\" alt=\"PyPI version fury.io\"></a>\n      <br>\n      <a href=\"https://github.com/kebasyaty/scruby/issues\"><img src=\"https://img.shields.io/github/issues/kebasyaty/scruby.svg\" alt=\"GitHub issues\"></a>\n      <a href=\"https://pepy.tech/projects/scruby\"><img src=\"https://static.pepy.tech/badge/scruby\" alt=\"PyPI Downloads\"></a>\n      <a href=\"https://github.com/kebasyaty/scruby/blob/main/LICENSE\" alt=\"GitHub license\"><img src=\"https://img.shields.io/github/license/kebasyaty/scruby\" alt=\"GitHub license\"></a>\n      <a href=\"https://mypy-lang.org/\" alt=\"Types: Mypy\"><img src=\"https://img.shields.io/badge/types-Mypy-202235.svg?color=0c7ebf\" alt=\"Types: Mypy\"></a>\n      <a href=\"https://docs.astral.sh/ruff/\" alt=\"Code style: Ruff\"><img src=\"https://img.shields.io/badge/code%20style-Ruff-FDD835.svg\" alt=\"Code style: Ruff\"></a>\n      <a href=\"https://github.com/kebasyaty/scruby\" alt=\"PyPI implementation\"><img src=\"https://img.shields.io/pypi/implementation/scruby\" alt=\"PyPI implementation\"></a>\n      <br>\n      <a href=\"https://pypi.org/project/scruby\"><img src=\"https://img.shields.io/pypi/format/scruby\" alt=\"Format\"></a>\n      <a href=\"https://github.com/kebasyaty/scruby\"><img src=\"https://img.shields.io/github/languages/top/kebasyaty/scruby\" alt=\"Top\"></a>\n      <a href=\"https://github.com/kebasyaty/scruby\"><img src=\"https://img.shields.io/github/repo-size/kebasyaty/scruby\" alt=\"Size\"></a>\n      <a href=\"https://github.com/kebasyaty/scruby\"><img src=\"https://img.shields.io/github/last-commit/kebasyaty/scruby/main\" alt=\"Last commit\"></a>\n      <a href=\"https://github.com/kebasyaty/scruby/releases/\" alt=\"GitHub release\"><img src=\"https://img.shields.io/github/release/kebasyaty/scruby\" alt=\"GitHub release\"></a>\n    </p>\n    <p align=\"center\">\n      Scruby is a fast key-value storage library that provides an ordered mapping from string keys to string values.\n      <br>\n      The library uses fractal-tree addressing.\n      <br>\n      The maximum size of the database is 16**32=340282366920938463463374607431768211456 branches,\n      each branch can store one or more keys.\n      <br>\n      The value of any key can be obtained in 32 steps, thereby achieving high performance.\n      <br>\n      There is no need to iterate through all the keys in search of the desired value.\n    </p>\n  </p>\n</div>\n\n## Documentation\n\nOnline browsable documentation is available at [https://kebasyaty.github.io/scruby/](https://kebasyaty.github.io/scruby/ \"Documentation\").\n\n## Requirements\n\n[View the list of requirements](https://github.com/kebasyaty/scruby/blob/v0/REQUIREMENTS.md \"Requirements\").\n\n## Installation\n\n```shell\nuv add scruby\n```\n\n## Usage\n\n```python\nimport anyio\nfrom scruby import Scruby\n\n\nasync def main() -> None:\n    \"\"\"Example.\"\"\"\n\n    db = Scruby()\n    await db.set_key(\"key name\", \"Some text\")\n    await db.get_key(\"key name\")  # => \"Some text\"\n    await db.get_key(\"key missing\")  # => KeyError\n    await db.has_key(\"key name\")  # => True\n    await db.has_key(\"key missing\")  # => False\n    await db.delete_key(\"key name\")\n    await db.delete_key(\"key missing\")  # => KeyError\n    # Full database deletion.\n    await db.napalm()\n    await db.napalm()  # => FileNotFoundError\n\n\nif __name__ == \"__main__\":\n    anyio.run(main)\n```\n\n## Changelog\n\n[View the change history](https://github.com/kebasyaty/scruby/blob/v0/CHANGELOG.md \"Changelog\").\n\n## License\n\nThis project is licensed under the [MIT](https://github.com/kebasyaty/scruby/blob/main/LICENSE \"MIT\").\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A fast key-value storage library.",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/kebasyaty/scruby/issues",
        "Changelog": "https://github.com/kebasyaty/scruby/blob/v0/CHANGELOG.md",
        "Homepage": "https://github.com/kebasyaty/scruby",
        "Repository": "https://github.com/kebasyaty/scruby",
        "Source": "https://github.com/kebasyaty/scruby"
    },
    "split_keywords": [
        "database",
        " db",
        " scruby",
        " store"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d113a3e4d64418286513f7184d98f3e62ce8c66a80db4112ba85a10396c39f60",
                "md5": "577967d7b1c80098bc96e31ac913a1d4",
                "sha256": "cbe718e92145a4c89a4abe3992d786a8c8de72164ef678bb5998046bcbb0d198"
            },
            "downloads": -1,
            "filename": "scruby-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "577967d7b1c80098bc96e31ac913a1d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 5537,
            "upload_time": "2025-08-27T06:41:02",
            "upload_time_iso_8601": "2025-08-27T06:41:02.545673Z",
            "url": "https://files.pythonhosted.org/packages/d1/13/a3e4d64418286513f7184d98f3e62ce8c66a80db4112ba85a10396c39f60/scruby-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 06:41:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kebasyaty",
    "github_project": "scruby",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scruby"
}
        
Elapsed time: 0.87291s