| Crates.io | hamdb |
| lib.rs | hamdb |
| version | 0.1.0 |
| created_at | 2025-12-29 05:41:48.108683+00 |
| updated_at | 2025-12-29 05:41:48.108683+00 |
| description | An API library for HamDB callsign lookups |
| homepage | https://github.com/MatthewIsHere/hamdb-rs |
| repository | https://github.com/MatthewIsHere/hamdb-rs |
| max_upload_size | |
| id | 2010014 |
| size | 56,947 |
Minimal async client for the public HamDB amateur-radio callsign lookup service.
Add the crate to your project using Cargo:
cargo add hamdb
use hamdb::v1::Client;
#[tokio::main]
async fn main() -> Result<(), hamdb::Error> {
let client = Client::new("app-name-here");
let info = client.lookup("W4AQL").await?;
println!("{} {}", info.call, info.country);
Ok(())
}
If you only need to validate user input before sending it to another system, reuse the parser directly:
use hamdb::parsing::parse_callsign;
let parsed = parse_callsign("W1AW/AE")?;
assert_eq!(parsed.base, "W1AW");
assert_eq!(parsed.suffix.as_deref(), Some("AE"));
Contributions are welcome. Feel free to open an issue or PR for any new features or concerns that you have.
Licensed under the MIT License; see LICENSE for the full text. This crate has no affiliation with the HamDB project or its maintainers, and HamDB retains all rights to its API, data, and trademarks. Use of this library is subject to HamDB's published policies and any integrations you build must respect their terms of use.