cicerotcv / cities-api

WIP cities and countries API
MIT License
1 stars 2 forks source link

made it easier to understand how to use search.py #11

Closed cpyberry closed 3 years ago

cpyberry commented 3 years ago

Hello, I am cpyberry. If you happen to have a free moment, I'd be very glad if you could give me your opinion.

Contents

Usage

cd cities-api
python search.py cities "sao paulo" -p

This will result in a function call like this:

search("cities", "sao paulo", True)

-p and --populate have the same effect If you do not grant these, this will result in a function call like this:

search("cities", "sao paulo", False)

If you want to see how to use it, please grant the -h or --help option

python search.py -h

usage: search.py [-h] [-p] {cities,continents,countries,languages} query

positional arguments:
  {cities,continents,countries,languages}
  query

optional arguments:
  -h, --help            show this help message and exit
  -p, --populate