Skip to content

ecogenetic/message-app-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Message App

A Flask web application that fetches and displays personalized messages based on user personality data retrieved from external APIs. Users can view and accept messages.

Features

  • Fetch Personality: Retrieves user personality data using a customer number.
  • Fetch Messages: Displays customized messages tailored to the user’s personality.
  • Accept Messages: Allows users to accept messages, with acceptance data sent to an external API.

Requirements

  • Python: Version 3.7 or higher
  • Flask and Requests: Python libraries for web handling and HTTP requests

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/python-message-app.git
  2. Navigate to the project directory:

    cd python-message-app
  3. Install dependencies:

    pip install Flask requests

Configuration

Update API URLs in app.py if different from the defaults:

MESSAGES_API_URL = 'http://localhost:8098/invocations'
PERSONALITY_API_URL = 'http://localhost:8092/invocations'
ACCEPTANCE_API_URL = 'http://localhost:8098/response'

Usage

  1. Run the App:

    python app.py

    Visit http://localhost:5000 in a web browser.

  2. Fetch Messages:

    • Enter a customer number and click Fetch Messages to load messages.
  3. Accept Messages:

    • Click Accept on a message to send acceptance data to the API.

Troubleshooting

  • API Issues: Ensure the API servers are running and accessible.
  • Error Logs: Run Flask in debug mode (app.run(debug=True)) to view detailed logs.

License

This project is licensed under the MIT License.

For questions or issues, please contact amy@ecosystem.ai.

About

Python message app example.

Resources

Stars

Watchers

Forks

Packages

No packages published