Skip to main content

gcloud-datastore-oem is a Python Object-Entity Mapper for working with Google Datastore.

Project description

Python object to entity mapper for Google Datastore with Django support.

Quickstart

from gcloudoem import *

class TestEntity(Entity):
    name = TextProperty()


class OtherTestEntity(Entity):
    address = TextProperty(default='blah')
    te = ListProperty(ReferenceProperty(TestEntity))

connect(dataset_id='dataset_id', namespace='demo')

es = TestEntity.objects.filter(name='Alice')
oe = OtherTestEntity(te=[e for e in es])
oe.save()
ot = OtherTestEntity.objects.get(pk=oe.key.name_or_id)
print(ot.key.name_or_id, [te.name for te in ot.te])
query = query.Query(TestEntity)
query.add_filter("name", "=", "Kris")
cursor = query()
print([(e.name, e.key.name_or_id,) for e in list(o)])

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
gcloudoem-0.1.0rc16.macosx-10.10-x86_64.tar.gz (118.1 kB) Copy SHA256 hash SHA256 Source None Oct 4, 2016
gcloudoem-0.1.0rc16.tar.gz (58.3 kB) Copy SHA256 hash SHA256 Source None Oct 4, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page