Skip to main content

beckon

Stop trying to make fetch happen.

A typed component registry backed by zope.interface. Register components behind formal interfaces. Look them up without circular imports. Relationships are inferred and bidirectional.

Install

pip install beckon

For Django integration:

pip install beckon[django]

Quick Start

from zope.interface import Interface
from beckon import register, BeckonInterface

class _IService(Interface):
    pass

IService = BeckonInterface(_IService)
# register
register(IService, MyService, name='email')

# beckon
import beckon

beckon(IService, 'email')  # -> MyService
beckon(IService)           # -> [('email', MyService)]

The module itself is callable — import beckon; beckon(...) works without importing the function separately.

Django Integration

Add beckon.django to INSTALLED_APPS:

INSTALLED_APPS = [
    'beckon.django',
    # ...
]

This registers a name resolver for Django models (_meta.label_lower) and provides IModel:

from beckon import register
from beckon.django import IModel

from .models import Post

register(IModel, Post)
import beckon
from beckon.django import IModel

Post = beckon(IModel, 'posts.post')

Custom Interfaces with Relationships

from zope.interface import Interface
from beckon import BeckonInterface, register

class _ISerializer(Interface):
    pass

ISerializer = BeckonInterface(_ISerializer, infer_from='model')

Register a serializer and it automatically links to its model:

register(IModel, Post)
register(ISerializer, PostSerializer)  # infers from Meta.model

beckon(ISerializer, 'posts.post')  # -> PostSerializer
beckon(IModel, 'posts.post')       # -> Post (reverse works too)

Type Safety

Interfaces carry generic type information:

IModel: BeckonInterface[type[Model]] = BeckonInterface(_IModel)

mypy infers return types automatically:

beckon(IModel, 'auth.user')  # mypy sees: type[Model] | None

Define your own typed interfaces and get the same inference:

IPermission: BeckonInterface[type[BasePermission]] = BeckonInterface(_IPermission)
beckon(IPermission, 'is_admin')  # mypy sees: type[BasePermission] | None

License

BSD 2-Clause. See LICENSE.

Metadata

Release files for beckon 0.1.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 beckon 0.1.0
File Size Uploaded
beckon-0.1.0.tar.gz 6.7 kB Details

Built distribution (wheel)

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

Total release size: 13.4 kB

Release files / beckon-0.1.0.tar.gz

Download URL beckon-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
85fe444ad883cee33d204b197315e0a4414ada1cf7f6f4d88725325c0dfe2ca8
BLAKE2b-256 checksum
How to use checksums
36095174ab42e14f39f98c47017d6a49547f5066c0262dfbc5024e54f1208aee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release files / beckon-0.1.0-py3-none-any.whl

Download URL beckon-0.1.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36d003b79433c89ddb9e516178282643b593f45b244fcc4ed20b296f83cf188e
BLAKE2b-256 checksum
How to use checksums
d3b0ac3370205798615c4ed203a23eee321ef60b91f08c3fe80bfd5dc2198c33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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