https://github.com/geocodefarm/geocodefarm-py
Python3 Library for Geocode.Farm API
https://github.com/geocodefarm/geocodefarm-py
geocode geocode-api geocode-farm geocodefarm geocoder geocoder-api geocoder-provider geocoding-api geocoding-library geocoding-service geocoding-services python-library python-sdk python-sdks python3 python3-library python3-sdk
Last synced: 4 months ago
JSON representation
Python3 Library for Geocode.Farm API
- Host: GitHub
- URL: https://github.com/geocodefarm/geocodefarm-py
- Owner: geocodefarm
- License: unlicense
- Created: 2025-04-05T08:49:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T09:23:33.000Z (about 1 year ago)
- Last Synced: 2025-10-19T10:28:38.817Z (8 months ago)
- Topics: geocode, geocode-api, geocode-farm, geocodefarm, geocoder, geocoder-api, geocoder-provider, geocoding-api, geocoding-library, geocoding-service, geocoding-services, python-library, python-sdk, python-sdks, python3, python3-library, python3-sdk
- Language: Python
- Homepage: https://geocode.farm
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GeocodeFarm Python Client
A lightweight, dependency-free Python client for the [Geocode.Farm](https://www.geocode.farm/) API (v4).
Supports both forward and reverse geocoding with simple, structured results.
> β‘ No third-party dependencies
> π Supports Geocode.Farm v4
> π§΅ Easy to use and extend
---
## π§ Installation
```bash
pip install geocodefarm
```
Or clone from GitHub:
```bash
git clone https://github.com/geocodefarm/geocodefarm-py.git
cd geocodefarm-py
pip install .
```
---
## πΊοΈ Usage
```python
from geocodefarm import GeocodeFarmClient
client = GeocodeFarmClient("your_api_key_here")
# Forward geocoding (address -> lat/lon)
result = client.forward("1600 Amphitheatre Parkway, Mountain View, CA")
print(result)
# Reverse geocoding (lat/lon -> address)
reverse = client.reverse(37.4221, -122.0841)
print(reverse)
```
---
## π¦ Response Format
All responses are normalized into this format:
```python
{
"success": True,
"status_code": 200,
"lat": 37.4221,
"lon": -122.0841,
"accuracy": "ROOFTOP",
"full_address": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA",
"result": {
"house_number": "1600",
"street_name": "Amphitheatre Parkway",
"locality": "Mountain View",
"admin_2": "Santa Clara County",
"admin_1": "California",
"country": "United States",
"postal_code": "94043",
"formatted_address": "...",
"latitude": ...,
"longitude": ...
}
}
```
If the request fails, `success` will be `False`, and an `error` message will be included.
---
## π οΈ Requirements
- Python 3.7+
- No external dependencies
---
## πͺͺ License
This project is released under [The Unlicense](https://unlicense.org) β public domain dedication.
---
## π Links
- [Geocode.Farm API Documentation](https://www.geocode.farm/our-apis/)
- [GitHub Repository](https://github.com/geocodefarm/geocodefarm-py)
- [PyPI Package](https://pypi.org/project/geocodefarm/)
---
## π€ Contributing
Pull requests are welcome. If you find bugs or want to improve the client, feel free to open an issue or PR.