{"id":15559330,"url":"https://github.com/gabrielfalcao/repocket","last_synced_at":"2026-05-11T08:36:10.467Z","repository":{"id":36684091,"uuid":"40990552","full_name":"gabrielfalcao/repocket","owner":"gabrielfalcao","description":"simple active record for redis","archived":false,"fork":false,"pushed_at":"2019-12-20T17:46:47.000Z","size":101,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T18:13:25.020Z","etag":null,"topics":["active-record","python","redis"],"latest_commit_sha":null,"homepage":"https://repocket.readthedocs.org","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/gabrielfalcao.png","metadata":{"files":{"readme":"README.rst","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":"2015-08-18T18:33:45.000Z","updated_at":"2018-04-29T03:43:07.000Z","dependencies_parsed_at":"2022-09-25T02:00:35.689Z","dependency_job_id":null,"html_url":"https://github.com/gabrielfalcao/repocket","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2Frepocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2Frepocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2Frepocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielfalcao%2Frepocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielfalcao","download_url":"https://codeload.github.com/gabrielfalcao/repocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241375316,"owners_count":19952693,"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":["active-record","python","redis"],"created_at":"2024-10-02T15:45:21.510Z","updated_at":"2026-05-11T08:36:05.445Z","avatar_url":"https://github.com/gabrielfalcao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Repocket\n########\n\nSimple active record for redis. Drop-in replacement for CQLEngine\n\n.. image:: https://readthedocs.org/projects/repocket/badge/?version=latest\n\n\nWhy\n===\n\nI needed an active record that worked almost as a drop-in replacement for CQLEngine.\n\nLong-story-short I had a project where I originally wrote the db layer\nusign cassandra, through CQLEngine. It became an overkill and I\ndecided to use redis instead.\n\nThere is a pretty good documentation available and more importantly\n**I commited to 100% of unit and functional test coverage**. This code\nis battle ready for production, if you find any bugs in it you can fix\nwithin minutes.\n\nThat also means that collaboration is easy, just don't break anything,\ndon't delete tests and add as test coverage to you collaboration: when\nfixing a bug, write at least one test to reproduce the problem in an\nautomated way.\n\nIf you want a new feature, please feel free to open a ticket and\nrequest, someone might make your dreams come true. Better yet, submit\na pull request; just please **remember to write tests and\ndocumentation** for your contributions.\n\n\n\nQuick Usage\n===========\n\n\n::\n\n   $ pip install repocket\n\n\n\nDeclare your models\n^^^^^^^^^^^^^^^^^^^\n\n\n::\n\n    \u003e\u003e\u003e from repocket import attributes\n    \u003e\u003e\u003e from repocket import ActiveRecord\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e class User(ActiveRecord):\n    ...     name = attributes.Unicode()\n    ...     house_name = attributes.Unicode()\n    ...     email = attributes.Bytes()\n    ...     password = attributes.Bytes()\n    ...     metadata = attributes.JSON()\n\n\nPersist in redis\n^^^^^^^^^^^^^^^^\n\n::\n\n    \u003e\u003e\u003e import bcrypt\n\n    \u003e\u003e\u003e harry = User(\n    ...     id='970773fa-4de1-11e5-86f4-6c4008a70392',\n    ...     name='Harry Potter',\n    ...     email='harry@hogwards.uk',\n    ...     house_name='Gryffindor',\n    ...     password=bcrypt.hashpw(b'hermione42', bcrypt.gensalt(10)),\n    ...     metadata={\n    ...         'known_tricks': [\n    ...             \"Protego\",\n    ...             \"Expelliarmus\",\n    ...             \"Wingardium Leviosa\",\n    ...             \"Expecto Patronum\"\n    ...         ]\n    ...     }\n    ... )\n    \u003e\u003e\u003e redis_keys_for_harry = harry.save()\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e ron = User.create(\n    ...     id='40997aa4-71fc-4ad3-b0d7-04c0fac6d6d8',\n    ...     name='Ron Weasley',\n    ...     house_name='Gryffindor',\n    ...     email='ron@hogwards.uk',\n    ...     password=bcrypt.hashpw(b'hermione42', bcrypt.gensalt(10)),\n    ...     metadata={\n    ...         'known_tricks': [\n    ...             \"Protego\",\n    ...             \"Expelliarmus\",\n    ...         ]\n    ...     }\n    ... )\n\n\nQuery\n^^^^^\n\n::\n\n    \u003e\u003e\u003e harry = User.objects.get(id='970773fa-4de1-11e5-86f4-6c4008a70392')\n    \u003e\u003e\u003e harry.metadata\n\n    \u003e\u003e\u003e results = User.objects.filter(house_name='Griffindor')\n    \u003e\u003e\u003e len(results)\n    \u003e\u003e\u003e results[0] == harry\n    True\n\n    \u003e\u003e\u003e results[1] == ron\n    True\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielfalcao%2Frepocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielfalcao%2Frepocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielfalcao%2Frepocket/lists"}