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)
| File | Size | Uploaded | |
|---|---|---|---|
| bonzo-0.2.0.tar.gz | 32.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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