• This repository has been archived on 28/Aug/2023
  • Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 11 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Object mapper for Amazon's DynamoDB

Flywheel

Build:build coverage
Documentation:http://flywheel.readthedocs.org/
Downloads:http://pypi.python.org/pypi/flywheel
Source:https://github.com/stevearc/flywheel

Object mapper for Amazon's DynamoDB

END OF LIFE WARNING: I haven't personally used this project, or even written much python, since early 2014. I will continue to respond to bugs and pull requests, but I am no longer doing active development. My apologies to those of you who have come to rely on Flywheel; I wish I had the time to continue it. If there is anyone in the community interested in becoming the new maintainer and continuing to move development forward, send me an email and we can discuss.

If you are looking for an alternative, I can recommend PynamoDB.

Getting Started

This is what a basic model looks like (schema taken from this DynamoDB API documentation)

from flywheel import Model, Field, GlobalIndex

class GameScore(Model):
    __metadata__ = {
        'global_indexes': [
            GlobalIndex('GameTitleIndex', 'title', 'top_score')
        ],
    }
    userid = Field(hash_key=True)
    title = Field(range_key=True)
    top_score = Field(type=int)
    top_score_time = Field(type=datetime)
    wins = Field(type=int)
    losses = Field(type=int)

    def __init__(self, title, userid):
        self.title = title
        self.userid = userid

Create a new top score

>>> score = GameScore('Master Blaster', 'abc')
>>> score.top_score = 9001
>>> score.top_score_time = datetime.utcnow()
>>> engine.sync(score)

Get all top scores for a user

>>> scores = engine.query(GameScore).filter(userid='abc').all()

Get the top score for Galaxy Invaders

>>> top_score = engine.query(GameScore).filter(title='Galaxy Invaders')\
...     .first(desc=True)

Atomically increment a user's "wins" count on Alien Adventure

>>> score = GameScore('Alien Adventure', 'abc')
>>> score.incr_(wins=1)
>>> engine.sync(score)

Get all scores on Comet Quest that are over 9000

>>> scores = engine.query(GameScore).filter(GameScore.top_score > 9000,
...                                         title='Comet Quest').all()

More Repositories

1

oil.nvim

Neovim file explorer: edit your filesystem like a buffer
Lua
3,907
star
2

conform.nvim

Lightweight yet powerful formatter plugin for Neovim
Lua
3,073
star
3

dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
Lua
1,844
star
4

aerial.nvim

Neovim plugin for a code outline window
Lua
1,711
star
5

overseer.nvim

A task runner and job management plugin for Neovim
Lua
1,193
star
6

pypicloud

S3-backed pypi server implementation
Python
505
star
7

vim-arduino

Vim plugin for compiling and uploading arduino sketches
Vim Script
345
star
8

quicker.nvim

Improved UI and workflow for the Neovim quickfix
Lua
321
star
9

stickybuf.nvim

Neovim plugin for locking a buffer to a window
Lua
246
star
10

resession.nvim

A replacement for mksession with a better API
Lua
226
star
11

gkeep.nvim

Google Keep integration for Neovim
Python
193
star
12

dql

A SQL-ish language for DynamoDB
Python
149
star
13

profile.nvim

lua profiler for nvim
Lua
126
star
14

qf_helper.nvim

A collection of improvements for the quickfix buffer
Lua
97
star
15

pypicloud-docker

Docker image for pypicloud
Shell
86
star
16

dotfiles

Lua
57
star
17

godot_parser

Python library for parsing Godot scene files
Python
54
star
18

pair-ls

Editor-agnostic remote pair programming
TypeScript
28
star
19

three.nvim

Neovim plugin for working with buffers, windows, and tabs
Lua
21
star
20

nvim-typecheck-action

Github action for typechecking a neovim plugin
Lua
17
star
21

pair-ls.nvim

Neovim plugin for pair-ls
Lua
14
star
22

dynamo3

Python 3 compatible library for DynamoDB
Python
13
star
23

gitstack

A utility for stacking branches and github pull requests
Python
12
star
24

pyramid_webpack

Pyramid extension for managing assets with Webpack
Python
10
star
25

vim-vscode-snippets

A collection of vscode snippets for vim
Python
9
star
26

nvim_doc_tools

Python scripts for Neovim documentation generation
Python
7
star
27

pyramid_duh

Utilities that you'll want for nearly every pyramid app
Python
6
star
28

Battlecode-Server-Tester

Distributed testing tool for the MIT Battlecode competition
Java
3
star
29

parseargs

Bash utility for parsing commandline arguments
Shell
2
star
30

pike

Asset pipeline and make tool
Go
2
star
31

pair-ls-vscode

VS Code extension for pair-ls
TypeScript
2
star
32

eat_your_vegetables

An organizational wrapper around celery
Python
2
star
33

bluepill

A command line utility for working inside docker containers
Python
2
star
34

pore

Command line full-text search
Rust
2
star
35

flow-coverage.nvim

Neovim plugin to display flow type coverage information
Lua
2
star
36

stevearc

1
star
37

stevetags

Little website for tagging Dropbox files
Python
1
star