Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dms-codes/hamdb

Ham Radio Callsign Information Retrieval This Python script allows you to retrieve information about ham radio callsigns using the HamDB API. You can obtain details such as callsign class, grid location, latitude, longitude, name, and address.
https://github.com/dms-codes/hamdb

api python scrape

Last synced: 2 days ago
JSON representation

Ham Radio Callsign Information Retrieval This Python script allows you to retrieve information about ham radio callsigns using the HamDB API. You can obtain details such as callsign class, grid location, latitude, longitude, name, and address.

Awesome Lists containing this project

README

        

# Ham Radio Callsign Information Retrieval

This Python script allows you to retrieve information about ham radio callsigns using the [HamDB API](http://api.hamdb.org/v1). You can obtain details such as callsign class, grid location, latitude, longitude, name, and address.

## Prerequisites

Before running the script, ensure you have the `requests` library installed. You can install it using `pip`:

```bash
pip install requests
```

## Usage

1. Import the necessary library:

```python
import requests
```

2. Define the base URL for the HamDB API:

```python
urlbase = "http://api.hamdb.org/v1/{}/json/hamdb"
```

3. Implement functions to retrieve specific information about a callsign:

- `GetData(callsign)`: Retrieves all available data for the specified callsign.
- `GetClass(callsign)`: Retrieves the class of the callsign.
- `GetGrid(callsign)`: Retrieves the grid location of the callsign.
- `GetLatLong(callsign)`: Retrieves the latitude and longitude of the callsign.
- `GetName(callsign)`: Retrieves the name associated with the callsign.
- `GetFullAddress(callsign)`: Retrieves the full address information of the callsign.

For example, to get the name associated with a callsign:

```python
name = GetName("vk3ye")
print(name)
```

4. Customize the functions or use them as needed to retrieve specific information about ham radio callsigns.

## Example

In this example, we retrieve the name associated with the "vk3ye" callsign and print it.

## License

This script is provided under the [MIT License](LICENSE).
```

Feel free to modify the README.md file to include additional information or examples based on your specific project requirements.