More convinient use of factory boy with sqlalchemy models
Project description
factory-boy-sqlalchemy
Why this package was created?
Most of factory-boy sqlalchemy packages, puts session in meta, so the factory is bound to session during creation.
In this package two helper functions are provided: make_async_sqlalchemy_factory and make_sync_sqlalchemy_factory,
which takes session less factory and bind to the session - it allows to use the same factory with async and sync session
Example
import factory
from sqlalchemy.orm import DeclarativeBase
class Base(DeclarativeBase):
...
class User(Base):
id_ = factory.Faker("name")
order = factory.Faker("between", from_=1, to=151)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file factory_boy_sqlalchemy-0.0.2.tar.gz.
File metadata
- Download URL: factory_boy_sqlalchemy-0.0.2.tar.gz
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79389ca42936ea438668e854dde89064381baafc2b32e8b936a71e77dc5eb3fe
|
|
| MD5 |
493892589c164c913416946df1f890a2
|
|
| BLAKE2b-256 |
249781e03e64f8e20a7212617c4d99a0e96f7c05d1b449bed1d38765bd3a8007
|
Provenance
The following attestation bundles were made for factory_boy_sqlalchemy-0.0.2.tar.gz:
Publisher:
publish.yml on dswistowski/factory-boy-sqlalchemy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
factory_boy_sqlalchemy-0.0.2.tar.gz -
Subject digest:
79389ca42936ea438668e854dde89064381baafc2b32e8b936a71e77dc5eb3fe - Sigstore transparency entry: 198509185
- Sigstore integration time:
-
Permalink:
dswistowski/factory-boy-sqlalchemy@24b68f3fab74ed72c24b412e654c97f5d2083948 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/dswistowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24b68f3fab74ed72c24b412e654c97f5d2083948 -
Trigger Event:
release
-
Statement type:
File details
Details for the file factory_boy_sqlalchemy-0.0.2-py3-none-any.whl.
File metadata
- Download URL: factory_boy_sqlalchemy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53ab73970a1c405238f7448b2d348dfd2fc9ac8ae3755be97b68839848569593
|
|
| MD5 |
cda6448af73fbd2c58c5187105a30526
|
|
| BLAKE2b-256 |
6092fb87826dde1b2914a578dd97cd5b083260aed140b5c3fd314b7bed4048c2
|
Provenance
The following attestation bundles were made for factory_boy_sqlalchemy-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on dswistowski/factory-boy-sqlalchemy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
factory_boy_sqlalchemy-0.0.2-py3-none-any.whl -
Subject digest:
53ab73970a1c405238f7448b2d348dfd2fc9ac8ae3755be97b68839848569593 - Sigstore transparency entry: 198509190
- Sigstore integration time:
-
Permalink:
dswistowski/factory-boy-sqlalchemy@24b68f3fab74ed72c24b412e654c97f5d2083948 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/dswistowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24b68f3fab74ed72c24b412e654c97f5d2083948 -
Trigger Event:
release
-
Statement type: