semvec/pypi-packages huggingface dataset:
python-jokes 0.0.1
A small joke library to fetch and search jokes from the internet!
License: MIT
Requires Python: >=3.6

# Python Jokes

`A small joke library to fetch and search jokes from the Internet`

![](https://img.shields.io/badge/License-MIT-important?style=for-the-badge&logo=)
![](https://img.shields.io/badge/Creator-Adarsh%20Gourab%20Mahalik-blueviolet?style=for-the-badge&logo=python)

How to get a random joke
```python
import pythonjokes

# Returns a random joke
print(pythonjokes.random_joke())
```
Get a list of categories
```python
import pythonjokes

print(pythonjokes.get_categories())
# Output : ["Programming","Misc","Dark","Pun","Spooky","Christmas"]
```

How to search a joke in a specific category <br>
`Examples are shown`
```python
import pythonjokes

# Default  category is Any (Any of the above categories)
print(pythonjokes.joke_search(query="Apples",category='Misc')
```
How to get response data 
```python
import pythonjokes

# Response data
print(pythonjokes.response_data(category='Programming',format='json',prettify=False))

# Getting A List Of Formats
print(python.get_formats())
# Output : ["json","plain text","xml","yaml"]
```

## License MIT