Skip to main content

A python wrapper for https://sv443.net/jokeapi/v2

Project description

Jokepy

Python Wrapper for sv443 JokeApi

Installation (Install versions > 1.0.0)

pip install jokepy

Importing Jokepy

from jokepy import Jokepy

Creating Jokepy object

j = Jokepy(categories=[],flags  =  [],idRange=[(startId),(endId)],type  =  (single/twopart),searchstring  = (searchstring))

Getjoke

j.getjoke()

Params

  • Categories : ['Programming' , 'Miscellaneous' , 'Dark']
  • Blacklist flags :['nsfw' , 'religious' , 'political' , 'racist' , 'sexist' ]
  • types : single / twopart

Exceptions

  • InvalidCategoryException (if the api doesnt supported categories)
  • InvalidFlagException (if the api doesnt support blackList flags)
  • InvalidTypeException(if the type is invalid)
  • InvalidIdRangeException (if the idRange is invalid)

Dependencies

API Documentation

Project details


Download files

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

Files for jokepy, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size jokepy-1.0.3-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size jokepy-1.0.3.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

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