Skip to main content

A simple wrapper for the Urban Dictionary API

Project description

CodeFactor grade Read the Docs build status Project version on PyPI Python versions supported on PyPI

A simple wrapper for the Urban Dictionary API in Python.

Features

  • Synchronous and asynchronous clients for the API

  • Definition objects for object-style access to definition attributes, and includes all fields

  • Full coverage of the known API

Requirements

  • Python 3.5.3 or higher. Python 2 is not supported.

  • aiohttp, version 3.6.2

Installing

You can install directly from PyPI:

python3 -m pip install pyud

On Windows this is:

py -3 -m pip install pyud

Quick Examples

Synchronous Example

import pyud

ud = pyud.Client()
definitions = ud.define("hello")
print(definitions[0].word) # Outputs "hello"

Asynchronous Example

import asyncio

import pyud


async def example():
    ud = pyud.AsyncClient()
    definitions = await ud.define("hello")
    print(definitions[0].word) # Outputs "hello"


loop = asyncio.get_event_loop()
loop.run_until_complete(example())

Documentation

pyud Documentation

License

GNU GPL v3

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

pyud-1.0.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

pyud-1.0.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file pyud-1.0.1.tar.gz.

File metadata

  • Download URL: pyud-1.0.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for pyud-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b9a0052a63a99e8e0e1bcfc064bfdf8da5310eb5bdc7d216702772f65b066eb2
MD5 cf323a15f58832e40e1f3825351f493d
BLAKE2b-256 a523b3296f7bc24b8e4f85ec24a365cd3b7812713e5368b575ed9b374405706f

See more details on using hashes here.

File details

Details for the file pyud-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyud-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for pyud-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3523f32549b41f1b4bb3312c0bebdcb9b00813a239aa0765498e12b4217aa42
MD5 97acff97287e02bdcacacf30fdccb11d
BLAKE2b-256 490171cc43cd3b0b2834a065d87e12b7b66c9375cecc1b3e35888ced625fce2b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page