Skip to main content

Various extensions, helpers, and utilities for Peewee

Project description

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 determining how to batch a create/update query with SQLite

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

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 at least Python 3.7 and at least Poetry 1.0. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peewee_plus-1.2.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peewee_plus-1.2.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file peewee_plus-1.2.0.tar.gz.

File metadata

  • Download URL: peewee_plus-1.2.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/5.15.0-52-generic

File hashes

Hashes for peewee_plus-1.2.0.tar.gz
Algorithm Hash digest
SHA256 206de37a7ed6f8a8e02423afee45315a2ef87c8fc945aada4b1af80c12cb02a8
MD5 ec6d42bf1d2e78f36f1431d7100f5751
BLAKE2b-256 d20947590c14496761836ae66206f2d26b82e9a73df782202d775520fb745ad2

See more details on using hashes here.

File details

Details for the file peewee_plus-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: peewee_plus-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/5.15.0-52-generic

File hashes

Hashes for peewee_plus-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 091a5bfbda39c0701b77d42000fb73597f56b58e6100e9c9bf80f18e55de7f17
MD5 1f89863876da7d4c42fb8427cb011fd2
BLAKE2b-256 97a20632ef340448eff07fa8658461fd65b7af593af9765fc5b858cabe534365

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page