close
Skip to content

Commit efa81d4

Browse files
committed
Extract CLI to separate opencage-cli package
Remove command_line.py, batch.py, their tests/fixtures, and the example batch.py + addresses.csv. The CLI now lives in its own repository and PyPI package (opencage-cli). Drop tqdm and certifi (only used by the batch CLI) and the [project.scripts] entry point. Bump to 3.4.0.
1 parent 0dd017f commit efa81d4

19 files changed

Lines changed: 5 additions & 1818 deletions

‎Changes.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v3.4.0 Sat May 2 2026
2+
CLI tool extracted to separate `opencage-cli` package and repository (https://github.com/OpenCageData/opencage-cli)
3+
14
v3.3.1 Sun Mar 29 2026
25
Validate the host domain parameter. Should be opencagedata.com subdomain or localhost
36
Set explicit timeout for HTTP requests

‎README.md‎

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ You can find a [comprehensive tutorial for using this module on the OpenCage sit
1717

1818
There are two brief video tutorials on YouTube, one [covering forward geocoding](https://www.youtube.com/watch?v=9bXu8-LPr5c), one [covering reverse geocoding](https://www.youtube.com/watch?v=u-kkE4yA-z0).
1919

20-
The module installs an `opencage` CLI tool for geocoding files. Check `opencage --help` or the [CLI tutorial](https://opencagedata.com/tutorials/geocode-commandline).
21-
2220
## Working with AI / Agent Skill
2321

2422
There is an [Agent Skill for working with the OpenCage Geocoding API](https://github.com/OpenCageData/opencage-skills/) which includes a reference file for developing in Python using this module.
@@ -100,9 +98,6 @@ async with OpenCageGeocode(key) as geocoder:
10098
results = await geocoder.geocode_async(address)
10199
```
102100

103-
For a more complete example and links to futher tutorials on asyncronous IO see
104-
`batch.py` in the `examples` directory.
105-
106101
### Non-SSL API use
107102

108103
If you have trouble accesing the OpenCage API with https, e.g. issues with OpenSSL
@@ -125,35 +120,7 @@ If anything goes wrong, then an exception will be raised:
125120

126121
## Command-line batch geocoding
127122

128-
Use `opencage forward` or `opencage reverse`
129-
130-
```
131-
opencage forward --help
132-
133-
options:
134-
-h, --help show this help message and exit
135-
--api-key API_KEY Your OpenCage API key
136-
--input FILENAME Input file name
137-
--output FILENAME Output file name
138-
--headers If the first row should be treated as a header row
139-
--input-columns Comma-separated list of integers (default '1')
140-
--add-columns Comma-separated list of output columns (default 'lat,lng,_type,_category,country_code,country,state,county,_normalized_city,postcode,road,house_number,confidence,formatted,json,status')
141-
--workers Number of parallel geocoding requests (default 1)
142-
--timeout Timeout in seconds (default 10)
143-
--retries Number of retries (default 5)
144-
--api-domain API domain (default api.opencagedata.com)
145-
--optional-api-params
146-
Extra parameters for each request (e.g. language=fr,no_dedupe=1)
147-
--unordered Allow the output lines to be in different order (can be faster)
148-
--limit Stop after this number of lines in the input
149-
--dry-run Read the input file but no geocoding
150-
--no-progress Display no progress bar
151-
--quiet No progress bar and no messages
152-
--overwrite Delete the output file first if it exists
153-
--verbose Display debug information for each request
154-
```
155-
156-
<img src="batch-progress.gif"/>
123+
The `opencage` CLI now lives in its own package. See [opencage-cli](https://github.com/OpenCageData/opencage-cli) — install with `pip install opencage-cli`.
157124

158125

159126
## Copyright & License

‎batch-progress.gif‎

-161 KB
Binary file not shown.

‎examples/addresses.csv‎

Lines changed: 0 additions & 595 deletions
This file was deleted.

‎examples/batch.py‎

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)