I don't know how to make them use the same encoding. To parse the different formats, either use various Google libraries -- see for example this Pull Request https://github.com/googleapis/google-cloud-python/pull/3491 -- or else write your own code. For this, the Protobuf "proto" file is needed, so either dig that up from some source code, like this, or else "roll your own" (not easy) by reverse-engineering the Protobuf binaries. Not easy.
Note that project-id, though part of this URL-safe string, is not really relevant to the Key itself. For example, if you copy objects between GAE projects, you want to access the "same" object in the two projects using the same query, ignoring the project. On Tue, Apr 9, 2019 at 7:27 PM dir Ls <[email protected]> wrote: > I took the key in the datastore viewer and used the > google.appengine.ext.ndb.Key(urlsafe=) api and I see it reconstructs the > key properly with the kind and id. In addition, I see an app field for the > key. But in the golang representation the Key struct doesn't have an app > field. So if an app has multiple micro services one in golang and another > in Python, and the encoded value is generated in one microservice and > passed to another, will there be a problem? Is it possible to make them all > use the same encoding? > > On Sunday, April 7, 2019 at 3:16:05 PM UTC-7, George (Cloud Platform > Support) wrote: >> >> The string representation of a key looks cryptic, but is not >> encrypted. If you don't want to expose this data to your users, you may >> consider encrypting these strings. >> >> How do your app keys look like in your app, and why do you consider these >> keys encrypted? A screen capture, with personal data highlighted out, would >> help in this case, as for Datastore viewer. You may refer to the "Key >> Class" documentation page >> <https://cloud.google.com/appengine/docs/standard/python/datastore/keyclass> >> for related information. >> > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/google-appengine. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/8523691e-afcf-48ae-bde4-9a66ed5a636e%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/8523691e-afcf-48ae-bde4-9a66ed5a636e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *JOSHUA FOX* Director, Software Architecture | Freightos *T (Israel): *+972-545691165 | *T (US)*: +1-3123400953 Smooth shipping. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAD%3DB7cPt4C_FF%2BEpVSmrJHtTAnr%2BppXrMWg%3DQMXyJo-urNrABQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
