https://github.com/laymonage/urbandictionary_top-python
A dead-simple module that fetches the top definition of a term from urbandictionary.
https://github.com/laymonage/urbandictionary_top-python
Last synced: 4 months ago
JSON representation
A dead-simple module that fetches the top definition of a term from urbandictionary.
- Host: GitHub
- URL: https://github.com/laymonage/urbandictionary_top-python
- Owner: laymonage
- License: mit
- Created: 2017-12-02T05:55:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T07:59:24.000Z (over 7 years ago)
- Last Synced: 2025-01-12T09:45:23.975Z (12 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# urbandictionary_top-python
A dead-simple module that fetches the top definition of a term from urbandictionary.
## Installation
### Using pip
```bash
$ pip install urbandictionary_top
```
### Manual
- Clone this repository or download urbandictionary_top.py
- Put urbandictionary_top.py somewhere you'd like to use it
## Usage
```bash
$ python
```
```python
>>> from urbandictionary_top import udtop
>>> term = udtop('term')
>>> print(term)
```
```text
Term is a word. A term is a term. The term term is a word that describes a body or building of letters formed into a descriptive compilation that stands for something, giving it substance.
Terms include: Every word o this website, save symbols and numerics:§ ‹>*#%@ and 129385, respectively.
Example: The term term is a term
```
```python
>>> term.definition
'Term is a word. A term is a term. The term term is a word that describes a body or building of letters formed into a descriptive compilation that stands for something, giving it substance.\nTerms include: Every word o this website, save symbols and numerics:§ ‹>*#%@ and 129385, respectively.'
>>> term.example
'The term term is a term'
```