Open alexander-matsievsky opened 4 years ago
# reprex.py import os import scrapinghub store = ( scrapinghub.ScrapinghubClient(os.getenv('SH_APIKEY')) .get_project(1234567890) .collections.get_store("ok_to_mess_around_with") ) writer = store.create_writer() writer.write({"foo": "bar"}) print("write") writer.write({"fizz": "buzz"}) print("write") writer.flush() print("flush")
python reprex.py write write ^CTraceback (most recent call last): ... KeyboardInterrupt
import os import scrapinghub store = ( scrapinghub.ScrapinghubClient(os.getenv('SH_APIKEY')) .get_project(1234567890) .collections.get_store("ok_to_mess_around_with") ) writer = store.create_writer() writer.write({"_key": "foo", "foo": "bar"}) print("write") writer.write({"_key": "fizz", "fizz": "buzz"}) print("write") writer.flush() print("flush")
python reprex.py write write flush
Failing
Passing