Skip to main content
CI status Coverage status John Bonham's sigil three intersecting circles

About

Bonzo is an asynchronous SMTP server built on Tornado. It started as a port of Python’s old smtpd module and now uses Tornado’s native async/await APIs.

Hello, world

Here is a simple “Hello, world” example SMTP server for Bonzo:

import asyncio
import bonzo.smtp


class Handler(bonzo.smtp.RequestHandler):
    async def data(self):
        print(self.request.message)


async def main():
    application = bonzo.smtp.Application(Handler)
    application.listen(2525)
    await asyncio.Event().wait()


if __name__ == '__main__':
    asyncio.run(main())

Installation

Use pip to install Bonzo:

$ pip install bonzo

Or install from the latest source:

$ pip install git+https://github.com/puentesarrin/bonzo.git

Documentation

Sphinx is needed to generate the documentation:

$ python -m sphinx -W --keep-going -b html docs docs/_build/html

Install the development tools and run the test suite with tox:

$ python -m pip install -e ".[dev]"
$ tox

Run the same tests directly with unittest:

$ python -m unittest discover -s tests -p '*_test.py'

To test against specific Python interpreters installed on your machine:

$ tox -e py39,py310,py311,py312,py313,pypy3

Also, the current documentation can be found at ReadTheDocs.

License

Bonzo is available under the Apache License, Version 2.0.

Metadata

Release files for bonzo 0.2.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 bonzo 0.2.0
File Size Uploaded
bonzo-0.2.0.tar.gz 32.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bonzo 0.2.0
File Interpreter ABI Platform
bonzo-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.4 kB

Release files / bonzo-0.2.0.tar.gz

Download URL bonzo-0.2.0.tar.gz
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f5443eebec3a41f8f4e47b4137a9dee4ca10eddcdd7606d324478b19db74e6b7
BLAKE2b-256 checksum
How to use checksums
3e38d3cbf2104641ee283302b3ecfff7071c30e2250a5bd181b464c927ad01c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release files / bonzo-0.2.0-py3-none-any.whl

Download URL bonzo-0.2.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8299335415bd1620730f074d022264defecd0a57cf21cd464917bb7c6724b6cb
BLAKE2b-256 checksum
How to use checksums
c0a5c2a70258d48766f5b690c1af07592fbe6aeaae91d7a2c36f37835e665c88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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