async_factory_boy
factory_boy extension with asynchronous ORM support
Requirements
python (3.8, 3.9, 3.10)
Instalation
Install using pip
pip install async_factory_boy
Usage
async_factory_boy integrate with Object Relational Mapping (ORM) through subclass of factory.Factory. All supported are listed below.
SQLAlchemy, with async_factory_boy.factory.sqlalchemy.AsyncSQLAlchemyFactory
from async_factory_boy.factory.sqlalchemy import AsyncSQLAlchemyFactory
class TestModelFactory(AsyncSQLAlchemyFactory):
class Meta:
model = TestModel
session = session
name = Faker("name")
created_at = Faker("date_time")
Tortoise ORM, with async_factory_boy.factory.tortoise.AsyncTortoiseFactory
from async_factory_boy.factory.tortoise import AsyncTortoiseFactory
class TestModelFactory(AsyncTortoiseFactory):
class Meta:
model = TestModel
name = Faker("name")
created_at = Faker("date_time")
and factory usage
test = await TestModelFactory.create()
test = await TestModelFactory.build()
For test configuration examples check tests/ directory.
Metadata
Release files for async-factory-boy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| async_factory_boy-1.0.1.tar.gz | 8.7 kB | Without provenance | Details for async_factory_boy-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| async_factory_boy-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for async_factory_boy-1.0.1-py2.py3-none-any.whl |
Total release size: 14.4 kB
Release files / async_factory_boy-1.0.1.tar.gz
| Download URL | async_factory_boy-1.0.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af3a42d9c26b86cc427faf5159ac2e8541b5564bf30424282eb866620af4e143
|
|
BLAKE2b-256 checksum How to use checksums |
0ee5a1eb125af7020d94e75caf4a994bf8d8c8c54924fd6b90b4a2a157583ced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / async_factory_boy-1.0.1-py2.py3-none-any.whl
| Download URL | async_factory_boy-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a0a652776ee164b60a45be06aca44a18781710447de1c534dda82d6cfe23f026
|
|
BLAKE2b-256 checksum How to use checksums |
79aa244bc0c1a1076217648d8268503656d5f08f9d7c319d4115fd13118dae1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for async-factory-boy 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.