https://github.com/adistomar/urbdict
Library for urbandictionary.com
https://github.com/adistomar/urbdict
definitions dictionary python urban-dictionary
Last synced: over 1 year ago
JSON representation
Library for urbandictionary.com
- Host: GitHub
- URL: https://github.com/adistomar/urbdict
- Owner: adistomar
- License: mit
- Created: 2022-08-20T20:34:03.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T05:38:58.000Z (about 2 years ago)
- Last Synced: 2025-02-19T12:17:57.593Z (over 1 year ago)
- Topics: definitions, dictionary, python, urban-dictionary
- Language: Python
- Homepage: https://pypi.org/project/urbdict/
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# urbdict
A library for [urbandictionary.com](https://www.urbandictionary.com/)
## Install:
```shell
pip install urbdict
```
## Usage:
Command line:
```shell
$ urbdict xterm
xterm
Godly creature, omnipotent, guru in every way imaginable.
Ex: I wish i was an xterm
by Anonymous August 26, 2003
https://www.urbandictionary.com:443/define.php?term=xterm
```
Python:
```shell
$ python3
Python 3.9.12 (main, Jun 1 2022, 06:36:29)
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urbdict
>>> x = urbdict.define("xterm")
>>> print(x)
{'word': 'xterm', 'definition': 'Godly creature, omnipotent, guru in every way imaginable.', 'example': 'I wish i was an xterm', 'contributor': 'by Anonymous August 26, 2003', 'url': 'https://www.urbandictionary.com:443/define.php?term=xterm'}
>>> print(x["definition"])
Godly creature, omnipotent, guru in every way imaginable.
>>>
```