Skip to main content

SQLAlchemy Faker is a provider for the Faker library that helps populate ORM models with dummy data. Creating a new instance of a model can be as simple as calling fake.sqlalchemy_model(SomeModel).

Installation

The recommend way to install SQLAlchemy Faker is with pip:

pip install faker_sqlalchemy

Example

Say you have some model declared using SQLAlchemy’s ORM.

>>> class SomeModel(Base):
...     __tablename__ = "some_model"
...
...     id = Column(Integer, primary_key=True)
...
...     value = Column(String)

And, you want to easily generate some data,

>>> from faker_sqlalchemy import SqlAlchemyProvider
>>>
>>> fake = Faker()
>>> fake.add_provider(SqlAlchemyProvider)
>>>
>>> instance = fake.sqlalchemy_model(SomeModel)

Use instance as desired.

>>> print(instance.value)
RNvnAvOpyEVAoNGnVZQU

Release files for faker_sqlalchemy 0.9.220807.post1551

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for faker_sqlalchemy 0.9.220807.post1551
File Size Uploaded
faker_sqlalchemy-0.9.220807.post1551.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for faker_sqlalchemy 0.9.220807.post1551
File Interpreter ABI Platform
faker_sqlalchemy-0.9.220807.post1551-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / faker_sqlalchemy-0.9.220807.post1551.tar.gz

Download URL faker_sqlalchemy-0.9.220807.post1551.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
42d76cf1f5683af640921a1b91ff1a460fc2aa20e2e108c66421dcd88e6041fe
BLAKE2b-256 checksum
How to use checksums
898e291229326e86918cced9cec59ca8af1e7aaff9d3635ab7c8b30dca665d47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Release files / faker_sqlalchemy-0.9.220807.post1551-py3-none-any.whl

Download URL faker_sqlalchemy-0.9.220807.post1551-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
929fae7638ff0d94f6e3bb60e73b63033e133bb5640d5af23805c7a3b413d5c6
BLAKE2b-256 checksum
How to use checksums
090ac122755ef0fd0e7b40f1dd062786389932a06ca588f1b92ad22bdce2e445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page