Skip to main content

Discord

Badges
Build Nox semantic-release PyPI Read the Docs
Tests coverage pre-commit asv
Standards SemVer 2.0.0 Conventional Commits
Code uv Ruff Nox Checked with mypy
Repo GitHub issues GitHub stars GitHub license All Contributors Contributor Covenant

RepeaterBook Python Client

Unofficial project. RepeaterBook Python Client is an independent, community-maintained library and is not affiliated with, endorsed by, or officially supported by RepeaterBook.com. "RepeaterBook" is a trademark of its respective owner. For the official website and API, visit https://repeaterbook.com/.

Welcome to the RepeaterBook Python Client documentation!

RepeaterBook Python Client is an unofficial, third-party Python library that provides a powerful and convenient interface to the RepeaterBook.com API — the world's largest database of amateur radio repeaters. With this library, you can programmatically download, query, and analyze repeater data for various amateur radio applications.

Features

  • Easy API Access: Download repeater data from RepeaterBook.com with a simple async interface
  • Local Database: Store repeater information in a local SQLite database for fast queries
  • Geographic Queries: Find repeaters near a location using distance-based filtering
  • Band Filtering: Query repeaters by frequency band (2m, 70cm, etc.)
  • Digital Mode Support: Filter by DMR, P25, NXDN, and other digital modes
  • Smart Caching: Automatic caching of API responses to reduce load and improve performance
  • Type Safe: Fully typed with mypy for excellent IDE support
  • Async/Await: Non-blocking I/O for efficient API operations

Quick Example

This library requires a per-user RepeaterBook API token. Request access, generate your token, and expose it as the REPEATERBOOK environment variable (for example export REPEATERBOOK="rbuapp_...").

import asyncio
import os
from repeaterbook import RepeaterBook, Repeater
from repeaterbook.services import RepeaterBookAPI
from repeaterbook.models import ExportQuery, Status
from repeaterbook.utils import LatLon, Radius
from repeaterbook.queries import filter_radius, square, band, Bands
import pycountry

async def find_nearby_repeaters():
    # Download repeater data
    api = RepeaterBookAPI(app_token=os.environ["REPEATERBOOK"])
    brazil = pycountry.countries.get(name="Brazil")
    repeaters = await api.download(query=ExportQuery(countries={brazil}))

    # Store in local database
    rb = RepeaterBook()
    rb.populate(repeaters)

    # Find DMR repeaters within 50km of São Paulo
    sao_paulo = LatLon(lat=-23.5505, lon=-46.6333)
    radius = Radius(origin=sao_paulo, distance=50)

    nearby = rb.query(
        square(radius),
        Repeater.dmr_capable == True,
        Repeater.operational_status == Status.ON_AIR,
        band(Bands.CM_70)  # 70cm band
    )

    filtered = filter_radius(nearby, radius)

    # Display results (filter_radius returns repeaters sorted by distance)
    from haversine import haversine
    for rep in filtered[:5]:
        distance = haversine(radius.origin, (rep.latitude, rep.longitude), unit=radius.unit)
        print(f"{distance:.1f}km - {rep.frequency:.4f} MHz - {rep.callsign}")

asyncio.run(find_nearby_repeaters())

Documentation

Read the full documentation

Read RepeaterBook.com's official API documentation for more information about the upstream API.

Use Cases

  • Trip Planning: Find repeaters along travel routes
  • Emergency Communications: Identify emergency-capable repeaters
  • Radio Programming: Generate codeplugs for DMR and other digital radios
  • Coverage Analysis: Create coverage maps and statistics
  • Network Analysis: Analyze repeater networks and infrastructure
  • Mobile Apps: Build repeater directory applications
  • Research: Analyze amateur radio repeater trends and distributions

Related Projects

See Also

Installation

PyPI

repeaterbook is available on PyPI:

# With uv (recommended)
uv add repeaterbook

# With pip
pip install repeaterbook

# With Poetry
poetry add repeaterbook

GitHub

You can also install the latest version of the code directly from GitHub:

# With uv
uv add git+https://github.com/MicaelJarniac/repeaterbook

# With pip
pip install git+https://github.com/MicaelJarniac/repeaterbook

# With Poetry
poetry add git+https://github.com/MicaelJarniac/repeaterbook

Requirements

  • Python 3.10 or higher
  • Dependencies are automatically installed:
    • aiohttp - Async HTTP client
    • sqlmodel - SQL ORM with type safety
    • haversine - Distance calculations
    • pycountry - Country/region codes
    • loguru - Structured logging
    • tqdm - Progress bars

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

More details can be found in CONTRIBUTING.

Contributors ✨

License

MIT

This project was created with the MicaelJarniac/crustypy template.

Download files

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

Source Distribution

repeaterbook-0.8.2.tar.gz (352.2 kB view details)

Uploaded Source

Built Distribution

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

repeaterbook-0.8.2-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file repeaterbook-0.8.2.tar.gz.

File metadata

  • Download URL: repeaterbook-0.8.2.tar.gz
  • Upload date:
  • Size: 352.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repeaterbook-0.8.2.tar.gz
Algorithm Hash digest
SHA256 4f8975b1103875031d37ad18d8a0a70f6121a7ba44d2933833c04bf1d521e313
MD5 45e43f702991999da0b690d211bdc833
BLAKE2b-256 fb82a95edaccc23dde3b4dd0bb276611d983a7d0a1c48a3bb09ff9def836b37a

See more details on using hashes here.

Provenance

The following attestation bundles were made for repeaterbook-0.8.2.tar.gz:

Publisher: semantic-release.yml on MicaelJarniac/repeaterbook

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

File details

Details for the file repeaterbook-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: repeaterbook-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repeaterbook-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 be287fa305decedd45df5368228c21ff9cc5d4ceae78615acb7f291d03cb6ee5
MD5 094cc2b0d0021714d2c2eb820b9524b9
BLAKE2b-256 96a964aa800e8075fd8078adc1aee8feac116974f16c4cf918541c60f830816e

See more details on using hashes here.

Provenance

The following attestation bundles were made for repeaterbook-0.8.2-py3-none-any.whl:

Publisher: semantic-release.yml on MicaelJarniac/repeaterbook

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

Release history Release notifications | RSS feed

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.4

2 files

0.8.3

2 files

This release

0.8.2 This release

2 files

0.8.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 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