Skip to main content

When they're not builtins, they're boltons.

Project description

Boltons

boltons should be builtins.

Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously missing from — the standard library, including:

Full and extensive docs are available on Read The Docs. See what's new by checking the CHANGELOG.

Boltons is tested against Python 3.7-3.14, as well as PyPy3.

Installation

Boltons can be added to a project in a few ways. There's the obvious one:

pip install boltons

On macOS, it can also be installed via MacPorts:

sudo port install py-boltons

Then, thanks to PyPI, dozens of boltons are just an import away:

from boltons.cacheutils import LRU
my_cache = LRU()

However, due to the nature of utilities, application developers might want to consider other options, including vendorization of individual modules into a project. Boltons is pure-Python and has no dependencies. If the whole project is too big, each module is independent, and can be copied directly into a project. See the Integration section of the docs for more details.

Third-party packages

The majority of boltons strive to be "good enough" for a wide range of basic uses, leaving advanced use cases to Python's myriad specialized 3rd-party libraries. In many cases the respective boltons module will describe 3rd-party alternatives worth investigating when use cases outgrow boltons. If you've found a natural "next-step" library worth mentioning, see the next section!

Gaps

Found something missing in the standard library that should be in boltons? Found something missing in boltons? First, take a moment to read the very brief architecture statement to make sure the functionality would be a good fit. It covers the design philosophy, what belongs in boltons, and how modules are organized.

Then, if you are very motivated, submit a Pull Request. Otherwise, submit a short feature request on the Issues page, and we will figure something out.

Development

Install uv, then set up a dev environment:

uv venv && uv pip install -e .

Run the test suite (includes doctests):

uvx --with tox-uv tox -e py314

Run all environments in parallel:

uvx --with tox-uv tox -p auto

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

boltons-26.1.0.tar.gz (227.4 kB view details)

Uploaded Source

Built Distribution

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

boltons-26.1.0-py3-none-any.whl (196.1 kB view details)

Uploaded Python 3

File details

Details for the file boltons-26.1.0.tar.gz.

File metadata

  • Download URL: boltons-26.1.0.tar.gz
  • Upload date:
  • Size: 227.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for boltons-26.1.0.tar.gz
Algorithm Hash digest
SHA256 5764468aba493b15995ed17f46a16789023f123ca2a62d491a9ce825c1cbe26c
MD5 ec7dd567ff58278b906c6d3a6d5e1145
BLAKE2b-256 479912bace94ae2ba961bdc46d49277ff15d38dba074bc3987b0c0b4355a37a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for boltons-26.1.0.tar.gz:

Publisher: publish.yml on mahmoud/boltons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file boltons-26.1.0-py3-none-any.whl.

File metadata

  • Download URL: boltons-26.1.0-py3-none-any.whl
  • Upload date:
  • Size: 196.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for boltons-26.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d966b165805b83600b31af9f0db672e3b3313d9de438e22708a94ac5f4c93de
MD5 4979420ee254107be5c95aeb2c6829fa
BLAKE2b-256 e9bacea118a16647cc72633c5236f6f11a09ab76b136b1aaccfa0d7004958428

See more details on using hashes here.

Provenance

The following attestation bundles were made for boltons-26.1.0-py3-none-any.whl:

Publisher: publish.yml on mahmoud/boltons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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