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.


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])
ot = OtherTestEntity.objects.get(pk=oe.key.name_or_id)
print(ot.key.name_or_id, [ for te in ot.te])
query = query.Query(TestEntity)
query.add_filter("name", "=", "Kris")
cursor = query()
print([(, 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
gcloudoem-0.1.0rc16.tar.gz (58.3 kB) Copy SHA256 hash SHA256 Source None

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 SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page