Question: In my store locator page, google map appears for a few minutes and disappears , 
in console I get the error:

> 
> Google Maps JavaScript API error: RefererNotAllowedMapError
>  <https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error>
>  Your site URL to be authorized: <https://preprod.site.com/magasins>
> 
> 
> 

How could i resolve this issue?

Answer: 
Based on redis-py [documentation](https://redis-py.readthedocs.io/en/latest/_modules/redis/client.html#Redis.xread):

Redis intitalization:

```
redis = redis.Redis(host='localhost')

```

To add a key-value pair (key-value should be a dictionary):

```
redis.xadd(stream_name, {key: value})

```

Block to read:

```
redis.xread({stream_name: '$'}, None, 0)

```

1. stream\_name and ID should be a dictionary.
2. $ means the most new message.

> 
> Moreover, instead of passing a normal ID for the stream mystream I
>  passed the special ID $. This special ID means that XREAD should use
>  as last ID the maximum ID already stored in the stream mystream, so
>  that we will receive only new messages, starting from the time we
>  started listening.[from here](https://redis.io/topics/streams-intro)
> 
> 
> 

3. COUNT should be NONE if you want to receive the newest, not just any number of messages.
4. 0 for BLOCK option means Block with a timeout of 0 milliseconds (that means to never timeout)
Looking at the help (or the docstrings [(1)](https://github.com/andymccurdy/redis-py/blob/31519e4ccef49fb59254ee5524007c81faa7e850/redis/client.py#L2182-L2190), [(2)](https://github.com/andymccurdy/redis-py/blob/31519e4ccef49fb59254ee5524007c81faa7e850/redis/client.py#L1965-L1974)) for the functions, they're quite straightforward:

```
>>> import redis
>>> r = redis.Redis()
>>> help(r.xadd)
    xadd(name, fields, id='*', maxlen=None, approximate=True)

    Add to a stream.
    name: name of the stream
    fields: dict of field/value pairs to insert into the stream
    id: Location to insert this record. By default it is appended.
    maxlen: truncate old stream members beyond this size
    approximate: actual stream length may be slightly more than maxlen

>>> help(r.xread)
    xread(streams, count=None, block=None)

    Block and monitor multiple streams for new data.
    streams: a dict of stream names to stream IDs, where
               IDs indicate the last ID already seen.
    count: if set, only return this many items, beginning with the
           earliest available.
    block: number of milliseconds to wait, if nothing already present.

```