GithubHelp home page GithubHelp logo

google-cloud-datastore-stub's People

Contributors

phil-lopreiato avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

google-cloud-datastore-stub's Issues

ModuleNotFoundError: No module named 'google.cloud.datastore_v1.proto'

Error
from google.cloud.datastore_v1.proto import datastore_pb2_grpc
ModuleNotFoundError: No module named 'google.cloud.datastore_v1.proto'

python3.10

packges

google-cloud-ndb==2.2.0
InMemoryCloudDatastoreStub==0.0.15

Would it be a problem with the most current versions of ndb?

Feature request - Autogenerate index.yaml

It would be great if the stub could be used to autogenerate the index.yaml file, i.e. you would run your test suite using the stub and the file would be generated. Similar to the datastore emulator or the python2 dev_appserver that would do this as you run the app locally. I have not looked into it, but the autogeneration code should be in the python appengine sdk, maybe it could be ported relatively easy

entity key.delete()

Hi Phil,

It seems like key.delete() is not working properly with the stub, any ideas?

Simple test case:

class TestStub(unittest.TestCase):
    def test_delete(self):
        entity = ndb.Model()
        entity.put()
        self.assertIsNotNone(entity.key)
        entity.key.delete()

causes:

  File "/InMemoryCloudDatastoreStub/_in_memory_store.py", line 92, in commitTransaction
    return [self._applyMutation(m) for m in final_mutations]
  File "/InMemoryCloudDatastoreStub/_in_memory_store.py", line 92, in <listcomp>
    return [self._applyMutation(m) for m in final_mutations]
  File "/InMemoryCloudDatastoreStub/_in_memory_store.py", line 100, in _applyMutation
    mutation_key = self._mutation_key(mutation)
  File "/InMemoryCloudDatastoreStub/_in_memory_store.py", line 138, in _mutation_key
    key = self._maybe_assign_key(op.key)
AttributeError: key

versions:

[packages]
InMemoryCloudDatastoreStub = "==0.0.12"
google-cloud-ndb = "==1.7.1"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.