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.

Download files

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

Source Distribution

bonzo-0.2.0.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

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

bonzo-0.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file bonzo-0.2.0.tar.gz.

File metadata

  • Download URL: bonzo-0.2.0.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bonzo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f5443eebec3a41f8f4e47b4137a9dee4ca10eddcdd7606d324478b19db74e6b7
MD5 cf768e0024ddad440479f05f7bb045a5
BLAKE2b-256 3e38d3cbf2104641ee283302b3ecfff7071c30e2250a5bd181b464c927ad01c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for bonzo-0.2.0.tar.gz:

Publisher: ci.yml on puentesarrin/bonzo

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

File details

Details for the file bonzo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bonzo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bonzo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8299335415bd1620730f074d022264defecd0a57cf21cd464917bb7c6724b6cb
MD5 d5ab7901d564195ab36d2da801e4114f
BLAKE2b-256 c0a5c2a70258d48766f5b690c1af07592fbe6aeaae91d7a2c36f37835e665c88

See more details on using hashes here.

Provenance

The following attestation bundles were made for bonzo-0.2.0-py3-none-any.whl:

Publisher: ci.yml on puentesarrin/bonzo

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 Sentry Error logging StatusPage Status page