Faker package

MRAB python at mrabarnett.plus.com
Fri Jun 18 20:22:05 EDT 2021


On 2021-06-18 23:24, 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.
> 
When it says "command line" it means the operating system's command 
line. If it's the Python shell , it'll say "Python shell" or "Python prompt.

The "root shell prompt (#)" suggests to  me that it's Linux, so if 
you're using Windows you'll need to use the equivalent for Windows.

> 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?
> 


More information about the Python-list mailing list