Skip to main content

Poor man unique constraints for Google Appengine NDB

Project description

Unique constraints for Google Appengine NDB

NDBUnq emulates unique constraints on Google Appengine Datastore using NDB hooks.

Example

There is full working example for Flask: https://github.com/vmihailenco/ndbunq-example/:

import ndbunq
from google.appengine.ext import ndb


class User(ndbunq.Model):
    username = ndb.StringProperty(required=True)

    class Meta:
        # username is guaranteed to be unique
        unique = (('username',),)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndbunq-0.1.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page