Church - is a library to generate fake data. It's very useful if you need to bootstrap your database.
➜ ~ pip install church
# At this moment a library supported 4 locales: en_us, de_de, fr_fr, ru_ru
#
# It's very useful if you need to bootstrap your database.
# Just create static method that will generate fake data.
# ...
@staticmethod
def _bootstrap(count=2000):
from church import Personal
person = Personal('en_us')
for _ in range(count):
user = User(username=person.username(),
email=person.email(),
user_twitter=person.twitter()
name=person.name('m'),
surname=person.surname(),
credit_card=person.credit_card_number(),
home_page=person.home_page(),
password=person.password(algorithm='sha1'),
gender=person.gender(abbreviated=True),
profession=person.profession(),
nationality=person.nationality()
)
try:
db.session.add(user)
except Exception:
db.session.commit()
# ...
Church is pretty simple library. All that you need is small guidebook.
Your contributions are always welcome! Please take a look at the contribution guidelines first.
No requirements, no dependencies
«Such teachings come through hypocritical liars, whose consciences have been seared as with a hot iron.» Timothy 1:4
If you offended by name of this library then you may don't use it.
Do Not Use!