JokeMachine


NameJokeMachine JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryA library to fetch dad jokes from a list of 3000 jokes.
upload_time2024-05-07 20:25:36
maintainerNone
docs_urlNone
authorSarah Akers
requires_python>=3.6
licenseNone
keywords joke dad joke humor funny
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # JokeMachine

A Python library to fetch dad jokes from a list of 3000 jokes.

## Installation

You can install JokeMachine via pip:

```bash
pip install JokeMachine
```





```python
from JokeMachine import Dad_Joke

# Fetch a random dad joke
setup, punchline = Dad_Joke()
print(setup)
print(punchline)

# Fetch a random dad joke and print the full joke
full_joke = Dad_Joke(full=True)
print(full_joke)
```
# Documentation
 ## `Dad_Joke()`
Fetches a random dad joke from the API.

**Arguments**
* `full` (bool, optional): If `True`, returns the full joke with a newline between setup and punchline. 
* `str` if `full` is `None`: The full joke as a single string with a newline between setup and punchline.
* `None` if the request fails or no jokes are available.

**Returns**

* `Tuple` if `full` is `None` (Default): A tuple representing the random joke fetched from the API, containing the setup (str) and punchline (str).
* `str` if `full` is `True`: The full joke as a single string with a newline between setup and punchline.
* None if the request fails or no jokes are available.

# Dependencies   
* `requests`


# Author
 Sarah Andersson

* Email Ripsweetener@gmail.com





            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "JokeMachine",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "joke, dad joke, humor, funny",
    "author": "Sarah Akers",
    "author_email": "Ripsweetener@gmail.com",
    "download_url": null,
    "platform": null,
    "description": "# JokeMachine\r\n\r\nA Python library to fetch dad jokes from a list of 3000 jokes.\r\n\r\n## Installation\r\n\r\nYou can install JokeMachine via pip:\r\n\r\n```bash\r\npip install JokeMachine\r\n```\r\n\r\n\r\n\r\n\r\n\r\n```python\r\nfrom JokeMachine import Dad_Joke\r\n\r\n# Fetch a random dad joke\r\nsetup, punchline = Dad_Joke()\r\nprint(setup)\r\nprint(punchline)\r\n\r\n# Fetch a random dad joke and print the full joke\r\nfull_joke = Dad_Joke(full=True)\r\nprint(full_joke)\r\n```\r\n# Documentation\r\n ## `Dad_Joke()`\r\nFetches a random dad joke from the API.\r\n\r\n**Arguments**\r\n* `full` (bool, optional): If `True`, returns the full joke with a newline between setup and punchline. \r\n* `str` if `full` is `None`: The full joke as a single string with a newline between setup and punchline.\r\n* `None` if the request fails or no jokes are available.\r\n\r\n**Returns**\r\n\r\n* `Tuple` if `full` is `None` (Default): A tuple representing the random joke fetched from the API, containing the setup (str) and punchline (str).\r\n* `str` if `full` is `True`: The full joke as a single string with a newline between setup and punchline.\r\n* None if the request fails or no jokes are available.\r\n\r\n# Dependencies   \r\n* `requests`\r\n\r\n\r\n# Author\r\n Sarah Andersson\r\n\r\n* Email Ripsweetener@gmail.com\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library to fetch dad jokes from a list of 3000 jokes.",
    "version": "0.0.1",
    "project_urls": null,
    "split_keywords": [
        "joke",
        " dad joke",
        " humor",
        " funny"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3934a2e7cb0b96637792cbfc873d48563a2a42efdfcc4004253effe6c8bf8bb",
                "md5": "e4ba82dff58ffe095ff5a593aad09bab",
                "sha256": "18b6fdd6df303e2b5eaf653d9a11142e875f0e086842c29ef560b43a907219ad"
            },
            "downloads": -1,
            "filename": "JokeMachine-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e4ba82dff58ffe095ff5a593aad09bab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3463,
            "upload_time": "2024-05-07T20:25:36",
            "upload_time_iso_8601": "2024-05-07T20:25:36.711392Z",
            "url": "https://files.pythonhosted.org/packages/e3/93/4a2e7cb0b96637792cbfc873d48563a2a42efdfcc4004253effe6c8bf8bb/JokeMachine-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-07 20:25:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "jokemachine"
}
        
Elapsed time: 3.85383s