<!--suppress HtmlDeprecatedAttribute -->
<div align=center>
<h1>Lorem Pysum</h1>
<h3>Generate instances of Pydantic models.</h3>
<img src="https://img.shields.io/badge/License-MIT-blue.svg"
height="20"
alt="License: MIT">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg"
height="20"
alt="Code style: black">
<img src="https://img.shields.io/pypi/v/lorem-pysum.svg"
height="20"
alt="PyPI version">
<img src="https://img.shields.io/badge/coverage-100%25-success"
height="20"
alt="Code Coverage">
</div>
## Install
Lorem Pysum is on PyPI and can be installed with:
```shell
poetry add lorem-pysum
```
or
```shell
pip install lorem-pysum
```
## Usage
Given a Pydantic model type Lorem Pysum can generate instances of that model with
randomly generated values.
## Example
```python
from enum import auto, Enum
from uuid import UUID
import lorem_pysum
from pydantic import BaseModel
class Flavor(Enum):
MOCHA = auto()
VANILLA = auto()
class Brand(BaseModel):
brand_name: str
class Coffee(BaseModel):
id: UUID
description: str
cream: bool
sweetener: int
flavor: Flavor
brand: Brand
lorem_pysum.generate(Coffee)
# Result -> id=UUID('550342d5-13ce-4ee1-b73d-d3c5e81607ce') description='string' cream=True sweetener=0 flavor=<Flavor.MOCHA: 1> brand=Brand(brand_name='string')
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/mburkard/lorem-pysum",
"name": "lorem-pysum",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Matthew Burkard",
"author_email": "matthewjburkard@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d7/04/bd6937be44cf716c90fac88401e5cd414dc8c265ffb92d30ec7f0c3389fe/lorem_pysum-1.4.10.tar.gz",
"platform": null,
"description": "<!--suppress HtmlDeprecatedAttribute -->\n<div align=center>\n <h1>Lorem Pysum</h1>\n <h3>Generate instances of Pydantic models.</h3>\n <img src=\"https://img.shields.io/badge/License-MIT-blue.svg\"\n height=\"20\"\n alt=\"License: MIT\">\n <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\n height=\"20\"\n alt=\"Code style: black\">\n <img src=\"https://img.shields.io/pypi/v/lorem-pysum.svg\"\n height=\"20\"\n alt=\"PyPI version\">\n <img src=\"https://img.shields.io/badge/coverage-100%25-success\"\n height=\"20\"\n alt=\"Code Coverage\">\n</div>\n\n## Install\n\nLorem Pysum is on PyPI and can be installed with:\n\n```shell\npoetry add lorem-pysum\n```\n\nor\n\n```shell\npip install lorem-pysum\n```\n\n## Usage\n\nGiven a Pydantic model type Lorem Pysum can generate instances of that model with\nrandomly generated values.\n\n## Example\n\n```python\nfrom enum import auto, Enum\nfrom uuid import UUID\n\nimport lorem_pysum\nfrom pydantic import BaseModel\n\n\nclass Flavor(Enum):\n MOCHA = auto()\n VANILLA = auto()\n\n\nclass Brand(BaseModel):\n brand_name: str\n\n\nclass Coffee(BaseModel):\n id: UUID\n description: str\n cream: bool\n sweetener: int\n flavor: Flavor\n brand: Brand\n\n\nlorem_pysum.generate(Coffee)\n# Result -> id=UUID('550342d5-13ce-4ee1-b73d-d3c5e81607ce') description='string' cream=True sweetener=0 flavor=<Flavor.MOCHA: 1> brand=Brand(brand_name='string')\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library to generate instances of Pydantic models.",
"version": "1.4.10",
"project_urls": {
"Homepage": "https://gitlab.com/mburkard/lorem-pysum",
"Repository": "https://gitlab.com/mburkard/lorem-pysum"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "23ab1364f3637bff8b4e1d9ade562f0ae493094b818c529d3009869a3a3fb6fe",
"md5": "50b8f59348c93103bffbbd56aba60478",
"sha256": "fb48f0eba047dfde4eff41a3bd8e886f9ccb089d06f908b665d6e3df86abd506"
},
"downloads": -1,
"filename": "lorem_pysum-1.4.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50b8f59348c93103bffbbd56aba60478",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 7509,
"upload_time": "2025-01-01T02:19:00",
"upload_time_iso_8601": "2025-01-01T02:19:00.953387Z",
"url": "https://files.pythonhosted.org/packages/23/ab/1364f3637bff8b4e1d9ade562f0ae493094b818c529d3009869a3a3fb6fe/lorem_pysum-1.4.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d704bd6937be44cf716c90fac88401e5cd414dc8c265ffb92d30ec7f0c3389fe",
"md5": "3b5e74cc70726a3d204d09999ba30658",
"sha256": "80a5a46cee33f86abb0ebcfcea42fecb6c374c7cfbe0fd5552410eb36c4d18d4"
},
"downloads": -1,
"filename": "lorem_pysum-1.4.10.tar.gz",
"has_sig": false,
"md5_digest": "3b5e74cc70726a3d204d09999ba30658",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 7086,
"upload_time": "2025-01-01T02:19:03",
"upload_time_iso_8601": "2025-01-01T02:19:03.180718Z",
"url": "https://files.pythonhosted.org/packages/d7/04/bd6937be44cf716c90fac88401e5cd414dc8c265ffb92d30ec7f0c3389fe/lorem_pysum-1.4.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 02:19:03",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "mburkard",
"gitlab_project": "lorem-pysum",
"lcname": "lorem-pysum"
}