# peewee+
Various extensions, helpers, and utilities for [Peewee](http://peewee-orm.com)
[![CI Status](https://github.com/enpaul/peewee-plus/workflows/CI/badge.svg?event=push)](https://github.com/enpaul/peewee-plus/actions)
[![PyPI Version](https://img.shields.io/pypi/v/peewee-plus)](https://pypi.org/project/peewee-plus/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/peewee-plus)](https://libraries.io/pypi/peewee-plus)
[![License](https://img.shields.io/pypi/l/peewee-plus)](https://opensource.org/licenses/MIT)
[![Python Supported Versions](https://img.shields.io/pypi/pyversions/peewee-plus)](https://www.python.org)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
See the [Changelog](https://github.com/enpaul/peewee-plus/blob/devel/CHANGELOG.md) for
release history.
## Documentation
*The documentation for this project is currently a work in progress. Please see the source
code for complete docs*
- [Installing](#installing)
- [Features](#features)
- [For Developers](#for-developers)
## Installing
peewee+ is [available on PyPI](https://pypi.org/project/peewee-plus/) and can be installed
using Poetry, Pipenv, or Pip:
```bash
# Using poetry
poetry add peewee-plus
# Using pipenv
pipenv install peewee-plus
# Using pip
python -m venv peewee
source peewee/bin/activate
python -m pip install peewee-plus
```
Once installed, Peewee+ can be imported like below:
```python
import peewee_plus
```
## Features
### Constants
`SQLITE_DEFAULT_PRAGMAS` - The default pragmas to use with an SQLite database connection,
taken directly from the
[Peewee docs](http://docs.peewee-orm.com/en/latest/peewee/database.html#recommended-settings).
`SQLITE_DEFAULT_VARIABLE_LIMIT` - The maximum number of variables an SQL query can use
when using SQLite
### Functions
`calc_batch_size` - Helper function for writing backend-agnostic batch queries while
accounting for the
[SQLite max variable limit](https://www.sqlite.org/limits.html#max_variable_number).
`flat_transaction` - Decorator function for wrapping callables in a database transaction
without creating nested transactions
### Classes
`PathField` - A Peewee database field for storing
[Pathlib](https://docs.python.org/3/library/pathlib.html) objects, optionally relative to
a runtime value.
`PrecisionFloatField` - A Peewee database field for storing floats while specifying the
[MySQL precision parameters](https://dev.mysql.com/doc/refman/8.0/en/floating-point-types.html)
`M` and `D`
`JSONField` - A Peewee database field for storing arbitrary JSON-serializable data
`EnumField` - A Peewee database field for storing Enums by name
`TimedeltaField` A Peewee database field for natively storing
[`datetime.timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta)
objects
## For Developers
All project contributors and participants are expected to adhere to the
[Contributor Covenant Code of Conduct, v2](CODE_OF_CONDUCT.md)
([external link](https://www.contributor-covenant.org/version/2/0/code_of_conduct/)).
The `devel` branch has the latest (and potentially unstable) changes. The stable releases
are tracked on [Github](https://github.com/enpaul/peewee-plus/releases),
[PyPi](https://pypi.org/project/peewee-plus/#history), and in the
[Changelog](CHANGELOG.md).
- To report a bug, request a feature, or ask for assistance, please
[open an issue on the Github repository](https://github.com/enpaul/peewee-plus/issues/new).
- To report a security concern or code of conduct violation, please contact the project
author directly at **me \[at\] enp dot one**.
- To submit an update, please
[fork the repository](https://docs.github.com/en/enterprise/2.20/user/github/getting-started-with-github/fork-a-repo)
and [open a pull request](https://github.com/enpaul/peewee-plus/compare).
Developing this project requires [Python 3.10](https://www.python.org/downloads/) or later
and [Poetry 1.2](https://python-poetry.org/docs/#installation) or later. GNU Make can
optionally be used to quickly setup a local development environment, but this is not
required.
To setup a local development environment:
```bash
# Clone the repository...
# ...over HTTPS
git clone https://github.com/enpaul/peewee-plus.git
# ...over SSH
git clone git@github.com:enpaul/peewee-plus.git
cd peewee-plus/
# Create and configure the local dev environment
make dev
# See additional make targets
make help
```
Raw data
{
"_id": null,
"home_page": "https://github.com/enpaul/peewee-plus/",
"name": "peewee-plus",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.1,<4.0.0",
"maintainer_email": "",
"keywords": "peewee,orm,extension,plguin,extra",
"author": "Ethan Paul",
"author_email": "24588726+enpaul@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/27/2b/202d42233a8d83ac3d30bbe2e5d3fe13ca848f9ccff81d6cedc8f1ee5739/peewee_plus-1.3.0.tar.gz",
"platform": null,
"description": "# peewee+\n\nVarious extensions, helpers, and utilities for [Peewee](http://peewee-orm.com)\n\n[![CI Status](https://github.com/enpaul/peewee-plus/workflows/CI/badge.svg?event=push)](https://github.com/enpaul/peewee-plus/actions)\n[![PyPI Version](https://img.shields.io/pypi/v/peewee-plus)](https://pypi.org/project/peewee-plus/)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/peewee-plus)](https://libraries.io/pypi/peewee-plus)\n[![License](https://img.shields.io/pypi/l/peewee-plus)](https://opensource.org/licenses/MIT)\n[![Python Supported Versions](https://img.shields.io/pypi/pyversions/peewee-plus)](https://www.python.org)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nSee the [Changelog](https://github.com/enpaul/peewee-plus/blob/devel/CHANGELOG.md) for\nrelease history.\n\n## Documentation\n\n*The documentation for this project is currently a work in progress. Please see the source\ncode for complete docs*\n\n- [Installing](#installing)\n- [Features](#features)\n- [For Developers](#for-developers)\n\n## Installing\n\npeewee+ is [available on PyPI](https://pypi.org/project/peewee-plus/) and can be installed\nusing Poetry, Pipenv, or Pip:\n\n```bash\n# Using poetry\npoetry add peewee-plus\n\n# Using pipenv\npipenv install peewee-plus\n\n# Using pip\npython -m venv peewee\nsource peewee/bin/activate\npython -m pip install peewee-plus\n```\n\nOnce installed, Peewee+ can be imported like below:\n\n```python\nimport peewee_plus\n```\n\n## Features\n\n### Constants\n\n`SQLITE_DEFAULT_PRAGMAS` - The default pragmas to use with an SQLite database connection,\ntaken directly from the\n[Peewee docs](http://docs.peewee-orm.com/en/latest/peewee/database.html#recommended-settings).\n\n`SQLITE_DEFAULT_VARIABLE_LIMIT` - The maximum number of variables an SQL query can use\nwhen using SQLite\n\n### Functions\n\n`calc_batch_size` - Helper function for writing backend-agnostic batch queries while\naccounting for the\n[SQLite max variable limit](https://www.sqlite.org/limits.html#max_variable_number).\n\n`flat_transaction` - Decorator function for wrapping callables in a database transaction\nwithout creating nested transactions\n\n### Classes\n\n`PathField` - A Peewee database field for storing\n[Pathlib](https://docs.python.org/3/library/pathlib.html) objects, optionally relative to\na runtime value.\n\n`PrecisionFloatField` - A Peewee database field for storing floats while specifying the\n[MySQL precision parameters](https://dev.mysql.com/doc/refman/8.0/en/floating-point-types.html)\n`M` and `D`\n\n`JSONField` - A Peewee database field for storing arbitrary JSON-serializable data\n\n`EnumField` - A Peewee database field for storing Enums by name\n\n`TimedeltaField` A Peewee database field for natively storing\n[`datetime.timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta)\nobjects\n\n## For Developers\n\nAll project contributors and participants are expected to adhere to the\n[Contributor Covenant Code of Conduct, v2](CODE_OF_CONDUCT.md)\n([external link](https://www.contributor-covenant.org/version/2/0/code_of_conduct/)).\n\nThe `devel` branch has the latest (and potentially unstable) changes. The stable releases\nare tracked on [Github](https://github.com/enpaul/peewee-plus/releases),\n[PyPi](https://pypi.org/project/peewee-plus/#history), and in the\n[Changelog](CHANGELOG.md).\n\n- To report a bug, request a feature, or ask for assistance, please\n [open an issue on the Github repository](https://github.com/enpaul/peewee-plus/issues/new).\n- To report a security concern or code of conduct violation, please contact the project\n author directly at **\u200cme \\[at\u200c\\] enp dot\u200e \u200cone**.\n- To submit an update, please\n [fork the repository](https://docs.github.com/en/enterprise/2.20/user/github/getting-started-with-github/fork-a-repo)\n and [open a pull request](https://github.com/enpaul/peewee-plus/compare).\n\nDeveloping this project requires [Python 3.10](https://www.python.org/downloads/) or later\nand [Poetry 1.2](https://python-poetry.org/docs/#installation) or later. GNU Make can\noptionally be used to quickly setup a local development environment, but this is not\nrequired.\n\nTo setup a local development environment:\n\n```bash\n# Clone the repository...\n# ...over HTTPS\ngit clone https://github.com/enpaul/peewee-plus.git\n# ...over SSH\ngit clone git@github.com:enpaul/peewee-plus.git\n\ncd peewee-plus/\n\n# Create and configure the local dev environment\nmake dev\n\n# See additional make targets\nmake help\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Various extensions, helpers, and utilities for Peewee",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/enpaul/peewee-plus/",
"Repository": "https://github.com/enpaul/peewee-plus/"
},
"split_keywords": [
"peewee",
"orm",
"extension",
"plguin",
"extra"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4d2d7eeb0848e3663a0082f12fa8b2c698160301e3ca39f11b758bd527dc6c70",
"md5": "b12637e34ac63d080ef9b2eccc1e0c02",
"sha256": "6b05e18e3bb14529902be06d7a0ba3bffa3f7885efba8b1730ba06c7dbdf095c"
},
"downloads": -1,
"filename": "peewee_plus-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b12637e34ac63d080ef9b2eccc1e0c02",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.1,<4.0.0",
"size": 9214,
"upload_time": "2023-05-04T19:28:04",
"upload_time_iso_8601": "2023-05-04T19:28:04.682991Z",
"url": "https://files.pythonhosted.org/packages/4d/2d/7eeb0848e3663a0082f12fa8b2c698160301e3ca39f11b758bd527dc6c70/peewee_plus-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "272b202d42233a8d83ac3d30bbe2e5d3fe13ca848f9ccff81d6cedc8f1ee5739",
"md5": "3158b8cf2075f85a50a536351e23a9ea",
"sha256": "44e32c67a2981199c3272af59a1f7a2c99c50cdb9d00cae4f37e615457e6e500"
},
"downloads": -1,
"filename": "peewee_plus-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "3158b8cf2075f85a50a536351e23a9ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.1,<4.0.0",
"size": 12898,
"upload_time": "2023-05-04T19:28:07",
"upload_time_iso_8601": "2023-05-04T19:28:07.609614Z",
"url": "https://files.pythonhosted.org/packages/27/2b/202d42233a8d83ac3d30bbe2e5d3fe13ca848f9ccff81d6cedc8f1ee5739/peewee_plus-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-04 19:28:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "enpaul",
"github_project": "peewee-plus",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "peewee-plus"
}