{"id":13502196,"url":"https://github.com/stevearc/flywheel","last_synced_at":"2025-03-29T10:32:49.009Z","repository":{"id":12692461,"uuid":"15364772","full_name":"stevearc/flywheel","owner":"stevearc","description":"Object mapper for Amazon's DynamoDB","archived":true,"fork":false,"pushed_at":"2021-12-26T03:38:21.000Z","size":455,"stargazers_count":127,"open_issues_count":11,"forks_count":25,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-24T01:11:39.833Z","etag":null,"topics":["aws","dynamodb","orm","python"],"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/stevearc.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-21T19:59:08.000Z","updated_at":"2024-11-28T16:28:29.000Z","dependencies_parsed_at":"2022-09-07T15:22:32.319Z","dependency_job_id":null,"html_url":"https://github.com/stevearc/flywheel","commit_stats":null,"previous_names":["mathcamp/flywheel"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevearc%2Fflywheel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevearc%2Fflywheel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevearc%2Fflywheel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevearc%2Fflywheel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevearc","download_url":"https://codeload.github.com/stevearc/flywheel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174207,"owners_count":20735406,"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":["aws","dynamodb","orm","python"],"created_at":"2024-07-31T22:02:05.663Z","updated_at":"2025-03-29T10:32:48.392Z","avatar_url":"https://github.com/stevearc.png","language":"Python","readme":"Flywheel\n========\n:Build: |build|_ |coverage|_\n:Documentation: http://flywheel.readthedocs.org/\n:Downloads: http://pypi.python.org/pypi/flywheel\n:Source: https://github.com/stevearc/flywheel\n\n.. |build| image:: https://travis-ci.org/stevearc/flywheel.png?branch=master\n.. _build: https://travis-ci.org/stevearc/flywheel\n.. |coverage| image:: https://coveralls.io/repos/stevearc/flywheel/badge.png?branch=master\n.. _coverage: https://coveralls.io/r/stevearc/flywheel?branch=master\n\nObject mapper for Amazon's DynamoDB\n\n**END OF LIFE WARNING**: I haven't personally used this project, or even written\nmuch python, since early 2014. I will continue to respond to bugs and pull\nrequests, but I am no longer doing active development. My apologies to those of\nyou who have come to rely on Flywheel; I wish I had the time to continue it. If\nthere is anyone in the community interested in becoming the new maintainer and\ncontinuing to move development forward, send me an email and we can discuss.\n\nIf you are looking for an alternative, I can recommend `PynamoDB\n\u003chttps://github.com/jlafon/PynamoDB\u003e`_.\n\nGetting Started\n===============\nThis is what a basic model looks like (schema taken from this `DynamoDB\nAPI documentation\n\u003chttp://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html\u003e`_)\n\n.. sourcecode:: python\n\n    from flywheel import Model, Field, GlobalIndex\n\n    class GameScore(Model):\n        __metadata__ = {\n            'global_indexes': [\n                GlobalIndex('GameTitleIndex', 'title', 'top_score')\n            ],\n        }\n        userid = Field(hash_key=True)\n        title = Field(range_key=True)\n        top_score = Field(type=int)\n        top_score_time = Field(type=datetime)\n        wins = Field(type=int)\n        losses = Field(type=int)\n\n        def __init__(self, title, userid):\n            self.title = title\n            self.userid = userid\n\nCreate a new top score\n\n.. sourcecode:: python\n\n    \u003e\u003e\u003e score = GameScore('Master Blaster', 'abc')\n    \u003e\u003e\u003e score.top_score = 9001\n    \u003e\u003e\u003e score.top_score_time = datetime.utcnow()\n    \u003e\u003e\u003e engine.sync(score)\n\nGet all top scores for a user\n\n.. sourcecode:: python\n\n    \u003e\u003e\u003e scores = engine.query(GameScore).filter(userid='abc').all()\n\nGet the top score for Galaxy Invaders\n\n.. sourcecode:: python\n\n    \u003e\u003e\u003e top_score = engine.query(GameScore).filter(title='Galaxy Invaders')\\\n    ...     .first(desc=True)\n\nAtomically increment a user's \"wins\" count on Alien Adventure\n\n.. sourcecode:: python\n\n    \u003e\u003e\u003e score = GameScore('Alien Adventure', 'abc')\n    \u003e\u003e\u003e score.incr_(wins=1)\n    \u003e\u003e\u003e engine.sync(score)\n\nGet all scores on Comet Quest that are over 9000\n\n.. sourcecode:: python\n\n    \u003e\u003e\u003e scores = engine.query(GameScore).filter(GameScore.top_score \u003e 9000,\n    ...                                         title='Comet Quest').all()\n","funding_links":[],"categories":["ORM","Python","Awesome Python","ODM, ORM, Active Record"],"sub_categories":["ORM"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevearc%2Fflywheel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevearc%2Fflywheel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevearc%2Fflywheel/lists"}