<commit_before># bloop 0.2.0

[![Build Status]
(https://travis-ci.org/numberoverzero/bloop.svg?branch=master)]
(https://travis-ci.org/numberoverzero/bloop)[![Coverage Status]
(https://coveralls.io/repos/numberoverzero/bloop/badge.png?branch=master)]
(https://coveralls.io/r/numberoverzero/bloop?branch=master)

Downloads https://pypi.python.org/pypi/bloop

Source https://github.com/numberoverzero/bloop

ORM for DynamoDB

# Installation

`pip install bloop`

# Getting Started

```python
import bloop

engine = bloop.Engine()

class GameScores(engine.model):
    user_id = Column(NumberType, hash_key=True)
    game_title = Column(StringType, range_key=True)
    top_score = Column(NumberType)
    top_score_date = Column(StringType)
    wins = Column(NumberType)
    losses = Column(NumberType)


engine.bind()

pong_score = GameScores(user_id=101, game_title="Pong")
doom_score = GameScores(user_id=102, game_title="Doom")
scores = [pong_score, doom_score]

try:
    engine.load(scores, consistent_read=True)
except bloop.ObjectsNotFound as e:
    print("Failed to load")
    for obj in e.missing:
        print(obj)
    pong_score.wins = 0
    doom_score.losses = 0
else:
    print("Loaded")

pong_score.wins += 1
doom_score.losses += 1

engine.save(scores)
print("Saved")

try:
    engine.delete(doom_score, condition=GameScores.losses > 3)
except bloop.ConstraintViolation as e:
    print("Failed to delete")
else:
    print("Deleted")

```

# Versioning
<commit_msg>Update README to actually run<commit_after># bloop 0.2.0

[![Build Status]
(https://travis-ci.org/numberoverzero/bloop.svg?branch=master)]
(https://travis-ci.org/numberoverzero/bloop)[![Coverage Status]
(https://coveralls.io/repos/numberoverzero/bloop/badge.png?branch=master)]
(https://coveralls.io/r/numberoverzero/bloop?branch=master)

Downloads https://pypi.python.org/pypi/bloop

Source https://github.com/numberoverzero/bloop

ORM for DynamoDB

# Installation

`pip install bloop`

# Getting Started

```python
from bloop import (
    Engine, Column,
    NumberType, StringType,
    ObjectsNotFound, ConstraintViolation
)

engine = Engine()

class GameScores(engine.model):
    user_id = Column(NumberType, hash_key=True)
    game_title = Column(StringType, range_key=True)
    top_score = Column(NumberType)
    top_score_date = Column(StringType)
    wins = Column(NumberType)
    losses = Column(NumberType)


engine.bind()

pong_score = GameScores(user_id=101, game_title="Pong")
doom_score = GameScores(user_id=102, game_title="Doom")
scores = [pong_score, doom_score]

try:
    engine.load(scores, consistent_read=True)
except ObjectsNotFound as e:
    print("Failed to load")
    for obj in e.missing:
        print(obj)
    pong_score.wins = 0
    doom_score.losses = 0
else:
    print("Loaded")

pong_score.wins += 1
doom_score.losses += 1

engine.save(scores)
print("Saved")

try:
    engine.delete(doom_score, condition=GameScores.losses > 3)
except ConstraintViolation as e:
    print("Failed to delete")
else:
    print("Deleted")

```

# Versioning

{'fraction_non_alphanumeric': 0.1295200525969757, 'fraction_numerical': 0.009204470742932281, 'mean_word_length': 4.709193245778612, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1595882', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1093, 'n_words': 201}