Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Hello again, Peabody here..." -- Mister Peabody


devel / comp.lang.python / Re: Faker package

SubjectAuthor
o Re: Faker packageTerry Reedy

1
Re: Faker package

<mailman.116.1624059963.4164.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=18182&group=comp.lang.python#18182

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!rocksolid2!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: tjreedy@udel.edu (Terry Reedy)
Newsgroups: comp.lang.python
Subject: Re: Faker package
Date: Fri, 18 Jun 2021 19:02:58 -0400
Lines: 23
Message-ID: <mailman.116.1624059963.4164.python-list@python.org>
References: <alpine.LNX.2.20.2106181517520.8149@salmo.appl-ecosys.com>
<saj8n5$shm$1@ciao.gmane.io>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de mn8/WO1Ii5OJ/btQaJOVcQFTdEUFcEpF5O4qD2kEn3Xw==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'random': 0.05; 'row':
0.05; 'message-id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io':
0.09; 'received:gmane.io': 0.09; 'received:list': 0.09; 'terry':
0.09; "can't": 0.14; 'conforms': 0.16; 'data?': 0.16;
'from:addr:udel.edu': 0.16; 'hypothesis': 0.16;
'received:116.202': 0.16; 'received:116.202.254': 0.16;
'received:116.202.254.214': 0.16; 'shepard': 0.16;
'subject:package': 0.16; 'wrote:': 0.16; 'python': 0.16; 'pm,':
0.20; 'to:addr:python-list': 0.23; 'command': 0.24; 'output':
0.28; 'header:User-Agent:1': 0.31; 'there': 0.31; 'but': 0.31;
"i'm": 0.32; 'assume': 0.32; 'using': 0.33; 'work.': 0.33; 'header
:In-Reply-To:1': 0.33; 'trying': 0.36; 'table': 0.37; 'use': 0.38;
'package': 0.40; 'copy': 0.61; 'me.': 0.62; 'data,': 0.63;
'types': 0.63; 'let': 0.65; 'shows': 0.70; 'received:116': 0.71;
'tool': 0.72; 'name,': 0.75; 'database': 0.77; "'the": 0.84;
'strings': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
In-Reply-To: <alpine.LNX.2.20.2106181517520.8149@salmo.appl-ecosys.com>
Content-Language: en-US
X-Mailman-Approved-At: Fri, 18 Jun 2021 19:46:01 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <saj8n5$shm$1@ciao.gmane.io>
X-Mailman-Original-References: <alpine.LNX.2.20.2106181517520.8149@salmo.appl-ecosys.com>
 by: Terry Reedy - Fri, 18 Jun 2021 23:02 UTC

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


devel / comp.lang.python / Re: Faker package

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor