Python utility to work with data from RepeaterBook.
Project description
RepeaterBook
Welcome to RepeaterBook's documentation!
RepeaterBook is a Python library that provides a powerful and convenient interface to RepeaterBook.com, 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
import asyncio
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()
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
- Getting Started - Tutorial for beginners
- Usage Guide - Comprehensive usage examples
- Examples - Real-world use cases
- Architecture - Understanding the internals
- API Reference - Complete API documentation
- FAQ - Common questions and troubleshooting
Read RepeaterBook'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
- MicaelJarniac/opengd77 - OpenGD77 radio programming
- MicaelJarniac/ogdrb - OpenGD77 RepeaterBook integration
See Also
- afourney/hamkit - Ham radio toolkit
- desertblade/OpenGD77-Repeaterbook - OpenGD77 integration
- TomHW/OpenGD77 - OpenGD77 firmware
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
This project was created with the MicaelJarniac/crustypy template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repeaterbook-0.4.2.tar.gz.
File metadata
- Download URL: repeaterbook-0.4.2.tar.gz
- Upload date:
- Size: 283.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fc3c5ecb11de36945f585e644be0bd94165909ad2458141a33427854a1cffb8
|
|
| MD5 |
2a507c60ed5e5a807577edb61915c92f
|
|
| BLAKE2b-256 |
17f6db9465b798c79477f957befc81ad7121547d5c17a62bb83d3cfa94bd0539
|
Provenance
The following attestation bundles were made for repeaterbook-0.4.2.tar.gz:
Publisher:
semantic-release.yml on MicaelJarniac/repeaterbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repeaterbook-0.4.2.tar.gz -
Subject digest:
3fc3c5ecb11de36945f585e644be0bd94165909ad2458141a33427854a1cffb8 - Sigstore transparency entry: 1029666618
- Sigstore integration time:
-
Permalink:
MicaelJarniac/repeaterbook@fbdcf715e6a32ba91d9c4c8db36ba0963acc6f48 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MicaelJarniac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@fbdcf715e6a32ba91d9c4c8db36ba0963acc6f48 -
Trigger Event:
push
-
Statement type:
File details
Details for the file repeaterbook-0.4.2-py3-none-any.whl.
File metadata
- Download URL: repeaterbook-0.4.2-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8532d53c8c5a86a5597f2b730a258c630cb27c95adeceb120147bd1ee7909507
|
|
| MD5 |
77c4af26bc060b328bafaf1c0d083b24
|
|
| BLAKE2b-256 |
e294a0dcbb34e6a87642be29b3b63c9c753c2e49cf08ccb99cddb2421c2aba0a
|
Provenance
The following attestation bundles were made for repeaterbook-0.4.2-py3-none-any.whl:
Publisher:
semantic-release.yml on MicaelJarniac/repeaterbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repeaterbook-0.4.2-py3-none-any.whl -
Subject digest:
8532d53c8c5a86a5597f2b730a258c630cb27c95adeceb120147bd1ee7909507 - Sigstore transparency entry: 1029666633
- Sigstore integration time:
-
Permalink:
MicaelJarniac/repeaterbook@fbdcf715e6a32ba91d9c4c8db36ba0963acc6f48 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MicaelJarniac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
semantic-release.yml@fbdcf715e6a32ba91d9c4c8db36ba0963acc6f48 -
Trigger Event:
push
-
Statement type: