GeocodeFarm Python Client
A lightweight, dependency-free Python client for the 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
pip install geocodefarm
Or clone from GitHub:
git clone https://github.com/geocodefarm/geocodefarm-py.git
cd geocodefarm-py
pip install .
🗺️ Usage
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:
{
"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 — public domain dedication.
🌐 Links
🤝 Contributing
Pull requests are welcome. If you find bugs or want to improve the client, feel free to open an issue or PR.
Metadata
Release files for geocodefarm 4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geocodefarm-4.0.tar.gz | 4.0 kB | Without provenance | Details for geocodefarm-4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geocodefarm-4.0-py3-none-any.whl | Python 3 | none | any | Details for geocodefarm-4.0-py3-none-any.whl |
Total release size: 8.3 kB
Release files / geocodefarm-4.0.tar.gz
| Download URL | geocodefarm-4.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
469c2b843069f73322fda72b3c5e03a94ce1d8c0ad9eae3390ad9ffd7233f06b
|
|
BLAKE2b-256 checksum How to use checksums |
5d74d1e4a3ab346c5bd0212485c8c8e25e6bc4825258421f01c6645226f11191
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / geocodefarm-4.0-py3-none-any.whl
| Download URL | geocodefarm-4.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae509e754b858032c2d51b6409c82b84c22dc38472071cecd71de354c13da45b
|
|
BLAKE2b-256 checksum How to use checksums |
1cfc73caaea75903cbb0fa19154b0ba8f5480cdfd7d989f986b199ecc9a58290
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for geocodefarm 4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.