Skip to content

Commit

Permalink
Deploying to gh-pages from @ litestar-org/polyfactory@c027bbd 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
adhtruong committed Oct 25, 2024
1 parent 55595a3 commit 6eeb161
Show file tree
Hide file tree
Showing 144 changed files with 45,900 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 594/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 704bfeb335ca27223b9e9a372c230072
tags: 645f666f9bcd5a90fca523b33c5a78b7
744 changes: 744 additions & 0 deletions 594/_modules/faker/proxy.html

Large diffs are not rendered by default.

380 changes: 380 additions & 0 deletions 594/_modules/index.html

Large diffs are not rendered by default.

393 changes: 393 additions & 0 deletions 594/_modules/polyfactory/decorators.html

Large diffs are not rendered by default.

380 changes: 380 additions & 0 deletions 594/_modules/polyfactory/exceptions.html

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions 594/_modules/polyfactory/factories/attrs_factory.html

Large diffs are not rendered by default.

1,538 changes: 1,538 additions & 0 deletions 594/_modules/polyfactory/factories/base.html

Large diffs are not rendered by default.

450 changes: 450 additions & 0 deletions 594/_modules/polyfactory/factories/beanie_odm_factory.html

Large diffs are not rendered by default.

420 changes: 420 additions & 0 deletions 594/_modules/polyfactory/factories/dataclass_factory.html

Large diffs are not rendered by default.

434 changes: 434 additions & 0 deletions 594/_modules/polyfactory/factories/msgspec_factory.html

Large diffs are not rendered by default.

422 changes: 422 additions & 0 deletions 594/_modules/polyfactory/factories/odmantic_odm_factory.html

Large diffs are not rendered by default.

985 changes: 985 additions & 0 deletions 594/_modules/polyfactory/factories/pydantic_factory.html

Large diffs are not rendered by default.

599 changes: 599 additions & 0 deletions 594/_modules/polyfactory/factories/sqlalchemy_factory.html

Large diffs are not rendered by default.

423 changes: 423 additions & 0 deletions 594/_modules/polyfactory/factories/typed_dict_factory.html

Large diffs are not rendered by default.

588 changes: 588 additions & 0 deletions 594/_modules/polyfactory/field_meta.html

Large diffs are not rendered by default.

478 changes: 478 additions & 0 deletions 594/_modules/polyfactory/fields.html

Large diffs are not rendered by default.

415 changes: 415 additions & 0 deletions 594/_modules/polyfactory/persistence.html

Large diffs are not rendered by default.

490 changes: 490 additions & 0 deletions 594/_modules/polyfactory/pytest_plugin.html

Large diffs are not rendered by default.

521 changes: 521 additions & 0 deletions 594/_modules/polyfactory/value_generators/complex_types.html

Large diffs are not rendered by default.

497 changes: 497 additions & 0 deletions 594/_modules/polyfactory/value_generators/constrained_collections.html

Large diffs are not rendered by default.

403 changes: 403 additions & 0 deletions 594/_modules/polyfactory/value_generators/constrained_dates.html

Large diffs are not rendered by default.

800 changes: 800 additions & 0 deletions 594/_modules/polyfactory/value_generators/constrained_numbers.html

Large diffs are not rendered by default.

500 changes: 500 additions & 0 deletions 594/_modules/polyfactory/value_generators/constrained_strings.html

Large diffs are not rendered by default.

491 changes: 491 additions & 0 deletions 594/_modules/polyfactory/value_generators/primitives.html

Large diffs are not rendered by default.

1,358 changes: 1,358 additions & 0 deletions 594/_modules/random.html

Large diffs are not rendered by default.

3,851 changes: 3,851 additions & 0 deletions 594/_modules/typing.html

Large diffs are not rendered by default.

791 changes: 791 additions & 0 deletions 594/_sources/changelog.rst.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions 594/_sources/contribution-guide.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:orphan:

.. include:: ../CONTRIBUTING.rst
42 changes: 42 additions & 0 deletions 594/_sources/getting-started.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
===============
Getting Started
===============

Polyfactory is a simple and powerful mock data generation library, based around type
hints and supporting :doc:`dataclasses <python:library/dataclasses>`, :class:`TypedDicts <typing.TypedDict>`,
Pydantic models, :class:`msgspec Struct's <msgspec.Struct>` and more.

Installation
------------

.. code-block:: bash
pip install polyfactory
Example
-------

.. literalinclude:: /examples/declaring_factories/test_example_1.py
:caption: Minimal example using a dataclass
:language: python

That is it - with almost no work, we are able to create a mock data object fitting the ``Person`` class model definition.

This is possible because of the typing information available on the dataclass, which are used as a
source of truth for data generation.

The factory parses the information stored in the dataclass and generates a dictionary of kwargs that are passed to
the ``Person`` class constructor.

Relation to ``pydantic-factories``
----------------------------------

Prior to version 2, this library was known as `pydantic-factories <https://pypi.org/project/pydantic-factories/>`_, a
name under which it gained quite a bit of popularity.

A main motivator for the 2.0 release was that we wanted to support more than just Pydantic models, something which also
required a change to its core architecture. As this library would no longer be directly tied to Pydantic, ``polyfactory``
was chosen as its new name to reflect its capabilities; It can generate mock data for
:doc:`dataclasses <python:library/dataclasses>`, :class:`TypedDicts <typing.TypedDict>`,
`Pydantic <https://docs.pydantic.dev/latest/>`_, `Odmantic <https://art049.github.io/odmantic/>`_,
and `Beanie ODM <https://beanie-odm.dev/>`_ models, as well as custom factories.
160 changes: 160 additions & 0 deletions 594/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
:layout: landing
:description: Polyfactory is a simple and powerful mock data generation library.

.. container::
:name: home-head

.. image:: https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Badge%20-%20Blue%20and%20Yellow.svg
:alt: Litestar Framework
:width: 400
:height: 400

.. container::

.. raw:: html

<h1>Polyfactory</h1>

.. container:: badges
:name: badges

.. image:: https://img.shields.io/github/actions/workflow/status/litestar-org/polyfactory/publish.yml?labelColor=202235&logo=github&logoColor=edb641
:alt: GitHub Actions Latest Release Workflow Status

.. image:: https://img.shields.io/github/actions/workflow/status/litestar-org/polyfactory/ci.yml?labelColor=202235&logo=github&logoColor=edb641
:alt: GitHub Actions CI Workflow Status

.. image:: https://img.shields.io/github/actions/workflow/status/litestar-org/polyfactory/docs.yml?labelColor=202235&logo=github&logoColor=edb641
:alt: GitHub Actions Docs Build Workflow Status

.. image:: https://img.shields.io/codecov/c/github/litestar-org/polyfactory?labelColor=202235&logo=codecov&logoColor=edb641
:alt: Coverage

.. image:: https://img.shields.io/pypi/v/polyfactory?labelColor=202235&color=edb641&logo=python&logoColor=edb641
:alt: PyPI Version

.. image:: https://img.shields.io/github/all-contributors/litestar-org/polyfactory?labelColor=202235&color=edb641&logoColor=edb641
:alt: Contributor Count

.. image:: https://img.shields.io/pypi/dm/polyfactory?logo=python&label=polyfactory%20downloads&labelColor=202235&color=edb641&logoColor=edb641
:alt: PyPI Downloads

.. image:: https://img.shields.io/pypi/pyversions/polyfactory?labelColor=202235&color=edb641&logo=python&logoColor=edb641
:alt: Supported Python Versions

.. rst-class:: lead

Polyfactory is a simple and powerful mock data generation library, based around type
hints and supporting :doc:`dataclasses <python:library/dataclasses>`, :class:`TypedDicts <typing.TypedDict>`,
Pydantic models, :class:`msgspec Struct's <msgspec.Struct>` and more.

.. container:: buttons

:doc:`Get Started <getting-started>`
`Usage Docs <usage>`_
`API Docs <reference>`_
`Blog <https://blog.litestar.dev>`_

.. grid:: 1 1 2 2
:padding: 0
:gutter: 2

.. grid-item-card:: :octicon:`versions` Changelog
:link: changelog
:link-type: doc

The latest updates and enhancements to Polyfactory

.. grid-item-card:: :octicon:`comment-discussion` Discussions
:link: https://github.com/litestar-org/polyfactory/discussions

Join discussions, pose questions, or share insights.

.. grid-item-card:: :octicon:`issue-opened` Issues
:link: https://github.com/litestar-org/polyfactory/issues

Report issues or suggest new features.

.. grid-item-card:: :octicon:`beaker` Contributing
:link: contribution-guide
:link-type: doc

Contribute to Litestar's growth with code, docs, and more.

Sponsors
--------

.. rst-class:: lead

Litestar is a community-driven, open-source initiative that thrives on the generous contributions of our sponsors,
enabling us to pursue innovative developments and continue our mission to provide exceptional tools and resources
to our users.


A huge thank you to our current sponsors:

.. container::
:name: sponsors-section

.. grid:: 3
:class-row: surface
:padding: 0
:gutter: 2

.. grid-item-card::
:link: https://github.com/scalar/scalar

.. image:: https://raw.githubusercontent.com/litestar-org/branding/main/assets/sponsors/scalar.svg
:alt: Scalar.com
:class: sponsor

`Scalar.com <https://github.com/scalar/scalar>`_

.. grid-item-card::
:link: https://telemetrysports.com/

.. image:: https://raw.githubusercontent.com/litestar-org/branding/main/assets/sponsors/telemetry-sports/unofficial-telemetry-whitebg.svg
:alt: Telemetry Sports
:class: sponsor

`Telemetry Sports <https://telemetrysports.com/>`_

.. grid-item-card::
:link: https://www.stok.kr/

.. image:: https://avatars.githubusercontent.com/u/144093421
:alt: Stok
:class: sponsor

`Stok <https://www.stok.kr/>`_

We invite organizations and individuals to join our sponsorship program.
By becoming a sponsor on platforms like `Polar <sponsor-polar_>`_, `GitHub <sponsor-github_>`_
and `Open Collective <sponsor-oc_>`_, you can play a pivotal role in our project's growth.

On top of regular sponsorship, we engage in pledge-based sponsorship opportunities through `Polar <sponsor-polar_>`_,
where you can pledge an amount towards an issue or feature you would like to see implemented.


.. _sponsor-github: https://github.com/sponsors/litestar-org
.. _sponsor-oc: https://opencollective.com/litestar
.. _sponsor-polar: https://polar.sh/litestar-org

.. toctree::
:titlesonly:
:caption: Documentation
:hidden:

getting-started
usage/index
reference/index

.. toctree::
:titlesonly:
:caption: Contributing
:hidden:

changelog
contribution-guide
Available Issues <https://github.com/search?q=user%3Alitestar-org+state%3Aopen+label%3A%22good+first+issue%22+++no%3Aassignee+repo%3A%22polyfactory%22&type=issues>
Code of Conduct <https://github.com/litestar-org/.github?tab=coc-ov-file#readme>
9 changes: 9 additions & 0 deletions 594/_sources/reference/constants.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
constants
=========


.. note:: Mapping of type annotations into concrete types.
This is used to normalize Python <= 3.9 annotations.

.. automodule:: polyfactory.constants
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/decorators.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
decorators
==========

.. automodule:: polyfactory.decorators
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/exceptions.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exceptions
==========

.. automodule:: polyfactory.exceptions
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/factories/attrs_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
attrs_factory
================

.. automodule:: polyfactory.factories.attrs_factory
:members:
4 changes: 4 additions & 0 deletions 594/_sources/reference/factories/base.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
base_factory
============

.. automodule:: polyfactory.factories.base
5 changes: 5 additions & 0 deletions 594/_sources/reference/factories/beanie_odm_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
beanie_odm_factory
==================

.. automodule:: polyfactory.factories.beanie_odm_factory
:members:
4 changes: 4 additions & 0 deletions 594/_sources/reference/factories/dataclass_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dataclass_factory
==================

.. automodule:: polyfactory.factories.dataclass_factory
18 changes: 18 additions & 0 deletions 594/_sources/reference/factories/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
factories
=========




.. toctree::
:maxdepth: 1

base
dataclass_factory
typed_dict_factory
pydantic_factory
msgspec_factory
odmantic_odm_factory
beanie_odm_factory
attrs_factory
sqlalchemy_factory
5 changes: 5 additions & 0 deletions 594/_sources/reference/factories/msgspec_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
msgspec_factory
================

.. automodule:: polyfactory.factories.msgspec_factory
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/factories/odmantic_odm_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
odmantic_odm_factory
====================

.. automodule:: polyfactory.factories.odmantic_odm_factory
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/factories/pydantic_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pydantic_factory
================

.. automodule:: polyfactory.factories.pydantic_factory
:members:
4 changes: 4 additions & 0 deletions 594/_sources/reference/factories/sqlalchemy_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sqlalchemy_factory
==================

.. automodule:: polyfactory.factories.sqlalchemy_factory
4 changes: 4 additions & 0 deletions 594/_sources/reference/factories/typed_dict_factory.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
typed_dict_factory
==================

.. automodule:: polyfactory.factories.typed_dict_factory
5 changes: 5 additions & 0 deletions 594/_sources/reference/field_meta.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
field_meta
==========

.. automodule:: polyfactory.field_meta
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/fields.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fields
======

.. automodule:: polyfactory.fields
:members:
19 changes: 19 additions & 0 deletions 594/_sources/reference/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
API Reference
=============

This section contains sections for API reference documentation for the ``polyfactory`` package.

.. toctree::
:titlesonly:
:maxdepth: 1
:caption: Articles

constants
exceptions
factories/index
field_meta
fields
decorators
persistence
pytest_plugin
value_generators/index
5 changes: 5 additions & 0 deletions 594/_sources/reference/persistence.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
persistence
===========

.. automodule:: polyfactory.persistence
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/pytest_plugin.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest_plugin
=============

.. automodule:: polyfactory.pytest_plugin
:members:
5 changes: 5 additions & 0 deletions 594/_sources/reference/value_generators/complex_types.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
complex_types
=============

.. automodule:: polyfactory.value_generators.complex_types
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
constrained_collections
========================

.. automodule:: polyfactory.value_generators.constrained_collections
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
constrained_dates
==================

.. automodule:: polyfactory.value_generators.constrained_dates
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
constrained_numbers
===================

.. automodule:: polyfactory.value_generators.constrained_numbers
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
constrained_strings
===================

.. automodule:: polyfactory.value_generators.constrained_strings
:members:
12 changes: 12 additions & 0 deletions 594/_sources/reference/value_generators/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
value_generators
================

.. toctree::
:maxdepth: 1

complex_types
constrained_collections
constrained_dates
constrained_numbers
constrained_strings
primitives
5 changes: 5 additions & 0 deletions 594/_sources/reference/value_generators/primitives.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
primitives
==========

.. automodule:: polyfactory.value_generators.primitives
:members:
Loading

0 comments on commit 6eeb161

Please sign in to comment.