pywebhooks icon indicating copy to clipboard operation
pywebhooks copied to clipboard

rethinkdb helper function

Open huamichaelchen opened this issue 5 years ago • 1 comments

Good stuff, but when I tried to run docker-compose up, stuff like rethink.connect() or rethink.db_list() are giving me some troubles. I suspect that we need to initialize rethinkdb object first?

For instance:

r = RethinkDB()
r.connect()
```


```python
import rethinkdb as rethink

from pywebhooks import DEFAULT_DB_NAME, RETHINK_PORT, \
    RETHINK_HOST, RETHINK_AUTH_KEY


def get_connection():
    return rethink.connect(
        host=RETHINK_HOST,
        port=RETHINK_PORT,
        auth_key=RETHINK_AUTH_KEY,
        db=DEFAULT_DB_NAME
    )
```

huamichaelchen avatar Nov 21 '19 15:11 huamichaelchen

Take a look at the Quick Start on how to init the DB. https://github.com/chadlung/pywebhooks#non-quickstart

chadlung avatar Nov 23 '19 00:11 chadlung