Skip to main content command line tool

Project description


leo-cli is a command line tool which can be used to translate words or phrases from several languages to german. It uses the open dictionary I wrote this because visiting their website, choosing the language, typing the word and clicking the submit button required several too many steps. I am a lazy person.


This tool requires beatiful soup, the wonderful requests library and the tabulate library.

Install leo-cli

pip install leo-cli


There has been a layout change on so you might have to pip install leo-cli --upgrade


leo -h
usage: leo [-h] [-l {en,pt,fr,de,es,ru}] [-i] [-p {all,n,v,adj}] [-d] [-v]
           words [words ...]
Retrieve word information via the Leo website
positional arguments:
  words                 the words to look up on the LEO website
optional arguments:
  -h, --help            show this help message and exit
  -l {en,pt,fr,de,es,ru}, --lang {en,pt,fr,de,es,ru}
                        source language, 2 chars (e.g. 'en')
  -i, --inflect         print inflection tables for all homonyms
  -p {all,n,v,adj}, --pos {all,n,v,adj}
                        Part of speech of words to translate/inflect.
  -d, --define          print dictionary definitions. True by default if -i is
                        not specified.
  -v, --verbose         Print debug messages


leo example
leo another example
leo "hang out"
leo -l fr bonne gout
leo -l ru книга
leo -l pt ação
leo -i reden
leo ii -p n reden


  • print non-German plurals
  • allow specifying target and source languages separately
  • (maybe) don't print conjugation labels in translation header for conjugations
  • alternative conjugations with labels for usage (hängen)
  • label haupt/nebensätzlich sections for verbs

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leo-cli-0.3.7.tar.gz (6.6 kB view hashes)

Uploaded source

Built Distribution

leo_cli-0.3.7-py3-none-any.whl (7.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page