Skip to content

Implementing BlobKeyProperty in ndb.#6445

Merged
dhermes merged 5 commits intogoogleapis:masterfrom
dhermes:ndb-add-BlobKeyProperty
Nov 13, 2018
Merged

Implementing BlobKeyProperty in ndb.#6445
dhermes merged 5 commits intogoogleapis:masterfrom
dhermes:ndb-add-BlobKeyProperty

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Nov 7, 2018

No description provided.

@dhermes dhermes requested a review from chrisrossi November 7, 2018 20:38
@dhermes dhermes requested a review from crwilcox as a code owner November 7, 2018 20:38
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 7, 2018
]


BlobKey = _ports.BlobKey

This comment was marked as spam.

MAX_BLOB_FETCH_SIZE = 1015808
UPLOAD_INFO_CREATION_HEADER = "X-AppEngine-Upload-Creation"

BlobKeyProperty = model.BlobKeyProperty

This comment was marked as spam.



@functools.total_ordering
class BlobKey:

This comment was marked as spam.

from google.cloud.ndb import exceptions


_MAX_STRING_LENGTH = 1500

This comment was marked as spam.

.. note::

The blobstore was an early Google App Engine feature that later became
Google Cloud Storage.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes dhermes force-pushed the ndb-add-BlobKeyProperty branch 2 times, most recently from a327b40 to 28b2155 Compare November 8, 2018 23:10
)
elif blob_key is not None:
raise exceptions.BadValueError(
"blob key should be a string; received "

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@chrisrossi
Copy link

This looks good to me for the most part. I'm still struggling with understanding why we need it.

I also wonder if, instead of _ports, we should we try to find true homes for anything we're having to hoover in from somewhere else, rather than a catchall. In this case, we could put BlobKey next to BlobKeyProperty in model or we could start our own _datastore_types module.

@dhermes
Copy link
Contributor Author

dhermes commented Nov 13, 2018

I think you're right about the _datastore_types module, so am doing a rename.

@dhermes dhermes force-pushed the ndb-add-BlobKeyProperty branch from 28b2155 to bf152fa Compare November 13, 2018 17:59
@dhermes dhermes merged commit 6b43d49 into googleapis:master Nov 13, 2018
@dhermes dhermes deleted the ndb-add-BlobKeyProperty branch November 13, 2018 19:52
chrisrossi pushed a commit to chrisrossi/google-cloud-python that referenced this pull request Feb 22, 2019
parthea pushed a commit that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: ndb cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants