Skip to main content

cleverbotfree

Cleverbot.com used to have a free API for their chatbot application. They have
removed their free API in place of a tiered subscription API service.
cleverbotfree is a free alternative to that API that uses a headless Firefox
browser to communicate with their chatbot application. You can use this module
to create applications/bots that send a recieve messages to the Cleverbot
chatbot application

Installation

Requirments

You need to have Python 3.x, pip, and the latest Firefox browser installed.
Once installed, you can install this library through pip.

pip install cleverbotfree

Drivers

Selenium requires a driver to interface with the headless browser. Firefox
requires geckodriver, which needs to be installed before this module can be
used. Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.

You can download the geckodriver at https://github.com/mozilla/geckodriver/releases

Failure to observe this step will give you the error
"Message: ‘geckodriver’ executable needs to be in PATH."

Usage

Examples

Example of a simple CLI script that creates a single use, one message chat session.

import cleverbotfree.cbfree
import sys
cb = cleverbotfree.cbfree.Cleverbot()

def chat():
    userInput = input('User: ')
    response = cb.single_exchange(userInput)
    print(response)
    cb.browser.close()
    sys.exit()

chat()

Example of a simple CLI script that creates a persistent chat session untill closed.

import cleverbotfree.cbfree
import sys
cb = cleverbotfree.cbfree.Cleverbot()

def chat():
    try:
        cb.browser.get(cb.url)
    except:
        cb.browser.close()
        sys.exit()
    while True:
        try:
            cb.get_form()
        except:
            sys.exit()
        userInput = input('User: ')
        if userInput == 'quit':
            break
        cb.send_input(userInput)
        bot = cb.get_response()
        print('Cleverbot: ', bot)
    cb.browser.close()

chat()

Metadata

Release files for cleverbotfree 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleverbotfree 1.2
File Size Uploaded Provenance
cleverbotfree-1.2.tar.gz 3.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cleverbotfree 1.2
File Interpreter ABI Platform
cleverbotfree-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / cleverbotfree-1.2.tar.gz

Download URL cleverbotfree-1.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5f7b0cd10f16bfaa871b9b54621851958ae8573968ce28bfc39edf97026cff4d
BLAKE2b-256 checksum
How to use checksums
16d02563172b1b97a0135669d76a26fef7b1990e8cb7d3e8853470c3831db120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8

Release files / cleverbotfree-1.2-py3-none-any.whl

Download URL cleverbotfree-1.2-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b45a63ba0c18f802745553055ca633ddcd10253843afa9d4022ea2d2a1b161f
BLAKE2b-256 checksum
How to use checksums
05041cc49edbcb8224d1b8de9a9af780e9bf0368564a4c0be8cce47ed5c8a251
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8

Security for cleverbotfree 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page