{"id":37618282,"url":"https://github.com/semiversus/python-revisiondict","last_synced_at":"2026-01-16T10:34:47.649Z","repository":{"id":31019031,"uuid":"126639245","full_name":"semiversus/python-revisiondict","owner":"semiversus","description":"RevisionDict works like an ordinary dictionary with additional revision keeping of changes.","archived":false,"fork":false,"pushed_at":"2025-09-04T15:41:19.000Z","size":80,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-23T08:24:34.938Z","etag":null,"topics":["cache","dictionary","python","revisioning"],"latest_commit_sha":null,"homepage":null,"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/semiversus.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","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}},"created_at":"2018-03-24T20:51:58.000Z","updated_at":"2024-01-19T12:42:32.000Z","dependencies_parsed_at":"2024-02-03T14:30:45.171Z","dependency_job_id":"f68e21bf-5d0d-4868-9467-4bef23ad2814","html_url":"https://github.com/semiversus/python-revisiondict","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":0.01851851851851849,"last_synced_commit":"34b57fd246d202ee481aa4487663c81d18ac9049"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/semiversus/python-revisiondict","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiversus%2Fpython-revisiondict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiversus%2Fpython-revisiondict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiversus%2Fpython-revisiondict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiversus%2Fpython-revisiondict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semiversus","download_url":"https://codeload.github.com/semiversus/python-revisiondict/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiversus%2Fpython-revisiondict/sbom","scorecard":{"id":810840,"data":{"date":"2025-08-11","repo":{"name":"github.com/semiversus/python-revisiondict","commit":"6581a28f61217bf6cd11956e577391e7872cb0df"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"Code-Review","score":0,"reason":"Found 1/23 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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/deploy.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/semiversus/python-revisiondict/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/semiversus/python-revisiondict/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/semiversus/python-revisiondict/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/semiversus/python-revisiondict/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/semiversus/python-revisiondict/deploy.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:20","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":"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":"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 'master'"],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T13:08:29.387Z","repository_id":31019031,"created_at":"2025-08-23T13:08:29.387Z","updated_at":"2025-08-23T13:08:29.387Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cache","dictionary","python","revisioning"],"created_at":"2026-01-16T10:34:46.999Z","updated_at":"2026-01-16T10:34:47.641Z","avatar_url":"https://github.com/semiversus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===================\nPython RevisionDict\n===================\n\n.. image:: https://img.shields.io/pypi/v/revisiondict.svg\n        :target: https://pypi.python.org/pypi/revisiondict\n\n.. image:: https://img.shields.io/travis/semiversus/python-revisiondict.svg\n        :target: https://travis-ci.org/semiversus/python-revisiondict\n\n.. image:: https://codecov.io/gh/semiversus/python-revisiondict/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/semiversus/python-revisiondict\n\n.. image:: https://img.shields.io/github/license/semiversus/python-revisiondict.svg\n        :target: https://en.wikipedia.org/wiki/MIT_License\n\nRevisionDict works like an ordinary dictionary with additional revision keeping of changes. It remembers the order when\nkeys were *updated* (in contrast to the ``OrderedDict`` which is remembering the order when keys are *inserted*).\n\nIt is revision tracking the overall dictionary, but does not store each earlier value for each key in the dictionary.\nIt's basically answering the following questions:\n\n* What is the actual revision number?\n* What changed since revsion number *N*?\n* In which revision has value of key *K* changed the last time?\n\nUse `RevisionDict` to build caching systems, interface multiple clients to a common database,\npublish/subscribe systems,...\n\nAdditional functionality compared to ``dict()``:\n\n* ``.revision`` - returning the actual revision as integer (starting with 0)\n* ``.base_revision`` - revision before oldest item changed (or 0 on empty dict)\n* ``.key_to_revision(key)`` - return the revision when the given key was changed\n* ``.checkout(start=0)`` - return a dict with changes since ``start``\n\nInstall\n-------\n\n.. code-block:: bash\n\n    pip install revisiondict\n\nExample\n-------\n\n.. code::python\n\n\u003e\u003e\u003e from revisiondict import RevisionDict\n\u003e\u003e\u003e d = RevisionDict()\n\u003e\u003e\u003e d.revision                    # get revision (is 0 at init)\n0\n\u003e\u003e\u003e d.base_revision               # get revision before oldest change\n0\n\nAdding new items:\n\n.. code::python\n\n\u003e\u003e\u003e d['a']=0; d['b']=1; d['c']=2  # make three updates\n\u003e\u003e\u003e d.revision                    # showing 3 changes\n3\n\u003e\u003e\u003e d.base_revision               # get revision before oldest change\n0\n\nInspecting content of RevisionDict:\n\n.. code::python\n\n\u003e\u003e\u003e d.checkout()=={'a': 0, 'b': 1, 'c': 2} # get a dictionary with all changes\nTrue\n\u003e\u003e\u003e d.checkout(2)                 # get all changes starting with rev. 2\n{'c': 2}\n\u003e\u003e\u003e d.checkout(3)                 # all changes starting with actual revision\n{}\n\u003e\u003e\u003e d.key_to_revision('b')        # revision where 'b' was changed last time\n2\n\u003e\u003e\u003e d\nRevisionDict([_Item(key='a', value=0, revision=1), _Item(key='b', value=1, revision=2), _Item(key='c', value=2, revision=3)])\n\nUpdate items:\n\n.. code::python\n\n\u003e\u003e\u003e d['a']=3                      # update value of 'a' (was 0 before)\n\u003e\u003e\u003e d.revision\n4\n\u003e\u003e\u003e d.base_revision\n1\n\u003e\u003e\u003e d.key_to_revision('a')\n4\n\u003e\u003e\u003e d.checkout(3)                 # get all changes starting with rev. 3\n{'a': 3}\n\u003e\u003e\u003e tuple(d.keys())               # iterate over keys (ordered by time of update)\n('b', 'c', 'a')\n\n\n`UniqueRevisionDict`\n--------------------\n\n`UniqueRevisionDict` is a subclass of `RevisionDict` which does not create a new revision, when an element is\nupdated with the same value.\n\n.. code::python\n\n\u003e\u003e\u003e from revisiondict import UniqueRevisionDict\n\u003e\u003e\u003e d = UniqueRevisionDict(a=0)\n\u003e\u003e\u003e d.revision\n1\n\n\u003e\u003e\u003e d['a']=0  # value is equal to the previous one\n\u003e\u003e\u003e d.revision\n1\n\n\u003e\u003e\u003e d['a']=False  # value is still equal as 0 == False\n\u003e\u003e\u003e d.revision\n1\n\n\u003e\u003e\u003e d['a']=100  # a new value is set, so revision is increased\n\u003e\u003e\u003e d.revision\n2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemiversus%2Fpython-revisiondict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemiversus%2Fpython-revisiondict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemiversus%2Fpython-revisiondict/lists"}