datastore-to-gcs
Transfers data from Google Cloud Datastore to Google Cloud Storage. Intended to be used from Google App Engine.
Usage
>>> import datastore_to_gcs
>>> from google.appengine.ext import ndb
>>>
>>> class Foo(datastore_to_gcs.BaseModel):
... email = ndb.StringProperty()
...
>>> f = Foo(email='a@b.com')
>>> f.put()
Key('Foo', 1)
>>> datastore_to_gcs.update(Foo, 'bucket-name', 'foo.json')
>>> f2 = Foo(email='b@b.com')
>>> f2.put()
Key('Foo', 2)
>>> import datastore_to_gcs.cloud_storage as gcs
>>> gcs.download_object('bucket-name', 'foo.json')
[{u'last_modified': u'2017-06-19T18:02:01.332908', u'email': u'a@b.com', u'id': 1}]
>>> datastore_to_gcs.update(Foo, 'bucket-name', 'foo.json')
>>> gcs.download_object('bucket-name', 'foo.json')
[{u'last_modified': u'2017-06-19T18:02:01.332908', u'email': u'a@b.com', u'id': 1}, {u'last_modified': u'2017-06-19T18:03:09.342067', u'email': u'b@b.com', u'id': 2}]
>>>
>>>
>>> class Message(datastore_to_gcs.BaseModel):
... text = ndb.StringProperty()
...
>>> m1 = Message(text='hello 1')
>>> m1.put()
Key('Message', 3)
>>> datastore_to_gcs.dump_log(Message, 'bucket-name', 'messages/')
'2017-06-19T18:05:07.json'
>>> m2 = Message(text='hello 2')
>>> m2.put()
Key('Message', 4)
>>> m3 = Message(text='hello 3')
>>> m3.put()
Key('Message', 5)
>>> datastore_to_gcs.dump_log(Message, 'bucket-name', 'messages/')
'2017-06-19T18:06:02.json'
>>> gcs.download_object('bucket-name', 'messages/2017-06-19T18:05:07.json')
[{u'text': u'hello 1', u'last_modified': u'2017-06-19T18:04:33.558426', u'id': 3}]
>>> gcs.download_object('bucket-name', 'messages/2017-06-19T18:06:02.json')
[{u'text': u'hello 2', u'last_modified': u'2017-06-19T18:05:35.084417', u'id': 4}, {u'text': u'hello 3', u'last_modified': u'2017-06-19T18:05:50.859952', u'id': 5}]
Contributing
Pull requests welcome! https://github.com/SocosLLC/datastore-to-gcs
About Socos
Socos LLC is the company behind Muse.
Muse brings your child’s everyday experiences to life and supports their development through research-based activities. Muse gives you insights into your child’s development and shows you what you can do each day to support their growth.
Metadata
Release files for datastore-to-gcs 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datastore-to-gcs-0.3.tar.gz | 6.4 kB | Without provenance | Details for datastore-to-gcs-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datastore_to_gcs-0.3-py2-none-any.whl | Python 2 | none | any | Details for datastore_to_gcs-0.3-py2-none-any.whl |
Total release size: 15.5 kB
Release files / datastore-to-gcs-0.3.tar.gz
| Download URL | datastore-to-gcs-0.3.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d9335b5c8371e6cdfbb9d210f5bb4b8b2b790356e052cfebd2e0487e6b81811
|
|
BLAKE2b-256 checksum How to use checksums |
df41e218bf5e5ae4da8a65c44c0eeb4eac97cddc8cd9d996f801ec2a87775178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / datastore_to_gcs-0.3-py2-none-any.whl
| Download URL | datastore_to_gcs-0.3-py2-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
5779d670572d422cd0e4e89b55f99587dfe7da19cfda4dc724c82c9a4abefc77
|
|
BLAKE2b-256 checksum How to use checksums |
ad4653d8675566cce2545c25b277db0523869689b4b47dcafa730a3b03bd04be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for datastore-to-gcs 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.