On 6/18/2021 6:24 PM, Rich Shepard wrote:
I'm trying to use the faker package to generate data to load in a sample
postgres database so I can learn how to use tksheet and psycopg2.

The 8.8.1 documentation shows output on a root shell prompt (#), not a
python prompt (>>>). It also has a description of using faker from 'the
command line', which I assume is the python shell, and I can't get it to
work. I suppose that I can generate one name, address, etc. at a time and
them copy and concatenate them into table data, but I thought that the faker
package would do this all for me.

Is there a tool that will let me generate the equivalent of a database row
worth of data? That is, a set of strings of different types that can then be
inserted into the testing database?

I would try using the 'given' function/decorator of hypothesis (on pypi) to generate random data that conforms to whatever specification.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to