Skip to main content

A Flask application for learning and interacting with Python concepts.

Project description

4/21/24

Lython

Lython is a chatbot-based platform using Open AI's API and Langchain to help students learn Python and get help directly with the questions they have for class and homework.

I wanted to make this application based off of my experience as a teacher who has high school students trying to learn Python. I often don't have time in one class period to reach everyone, and thought that this might be a good alternative to having them use regular Chat-GPT, which would just give them answers.

Installation

From a virtual environment, run the following commands;

pip pip install lython-basic

pip install openai

flask --app lython_basic init-db

flask --app lython_basic run 

You can then visit the link it provides you, or http://127.0.0.1:5000/auth/register to start

Dependencies

The application is built primarily using Flask. HTML and CSS structured mostly from their documentation, with a little customization to fit the school colors/theme.

Database for the Users and Chat Responses stored using a SQLite Database.

Calls to the chatbot for general chat are using OpenAI's API.

My students use two platforms primarily for work; Coding Bat and Amazon's Project STEM. Since Project STEM requires an account to view, and I wanted to show off the webscraping ability via LangChain, I decided to just include problems from Coding Bat.

The project has been uploaded to Pythons Test Package Deployment, and is the current main distribution method.

Usage

After the database is set up, you must configure an Open AI key to a global environment variable, "OPENAI-API-KEY".

You can begin by registering for an account. Questions are unable to be asked until a user has signed in.

The current Coding Bat questions are saved in "codingbat_urls.csv", so any more questions you want to add from there, you can drop the URL in there. You can begin asking for question specific questions in the RAG chat.

Acknowledgements

This project was inspired by my students, and their constant need to cheat on homework assignments.

Big thank you for Blake (Blaque2Pi), Benjamin, and a few other GCU students for reviewing my code, help, and advice over the last few months.

License

MIT

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

lython_basic-1.0.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lython_basic-1.0.3-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file lython_basic-1.0.3.tar.gz.

File metadata

  • Download URL: lython_basic-1.0.3.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for lython_basic-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ca091043de1e36ce0fd85868315d82af9fd973c76b16194a2d583923f2c8995a
MD5 70caf82f3e6826118efc21147e10250f
BLAKE2b-256 ab28c3ff1ec1adf5efc22a1e24572942e18411e91e352019dda48361e3b7d293

See more details on using hashes here.

File details

Details for the file lython_basic-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: lython_basic-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for lython_basic-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b644180d3cafd226965d248b5dacf60388d26af614a351a4b9c7af92c0d386b
MD5 3c7f4636d3bf32f991ca1d0697bedb50
BLAKE2b-256 925f88017dd19ec9cf8c9e45780d4c20ff453364e4458c10ea78a55b5e0a2bf1

See more details on using hashes here.

Supported by

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