Skip to main content

peewee+

Various extensions, helpers, and utilities for Peewee

CI Status PyPI Version PyPI Downloads License Python Supported Versions Code style: black

See the Changelog for release history.

Documentation

The documentation for this project is currently a work in progress. Please see the source code for complete docs

Installing

peewee+ is available on PyPI and can be installed using Poetry, Pipenv, or Pip:

# 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:

import peewee_plus

Features

Constants

SQLITE_DEFAULT_PRAGMAS - The default pragmas to use with an SQLite database connection, taken directly from the Peewee docs.

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.

flat_transaction - Decorator function for wrapping callables in a database transaction without creating nested transactions

Classes

PathField - A Peewee database field for storing Pathlib objects, optionally relative to a runtime value.

PrecisionFloatField - A Peewee database field for storing floats while specifying the MySQL precision parameters 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 objects

For Developers

All project contributors and participants are expected to adhere to the Contributor Covenant Code of Conduct, v2 (external link).

The devel branch has the latest (and potentially unstable) changes. The stable releases are tracked on Github, PyPi, and in the Changelog.

Developing this project requires Python 3.10 or later and Poetry 1.2 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:

# 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

Metadata

Release files for peewee-plus 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peewee-plus 1.3.0
File Size Uploaded
peewee_plus-1.3.0.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peewee-plus 1.3.0
File Interpreter ABI Platform
peewee_plus-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / peewee_plus-1.3.0.tar.gz

Download URL peewee_plus-1.3.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
44e32c67a2981199c3272af59a1f7a2c99c50cdb9d00cae4f37e615457e6e500
BLAKE2b-256 checksum
How to use checksums
272b202d42233a8d83ac3d30bbe2e5d3fe13ca848f9ccff81d6cedc8f1ee5739
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.6 Linux/5.19.0-41-generic

Release files / peewee_plus-1.3.0-py3-none-any.whl

Download URL peewee_plus-1.3.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b05e18e3bb14529902be06d7a0ba3bffa3f7885efba8b1730ba06c7dbdf095c
BLAKE2b-256 checksum
How to use checksums
4d2d7eeb0848e3663a0082f12fa8b2c698160301e3ca39f11b758bd527dc6c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.6 Linux/5.19.0-41-generic

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page