Welcome to OpenDash, a Flask-based Stock Market Dashboard application. This app provides an API to fetch stock data and displays a welcoming message on the home route.
- Fetch stock data through a RESTful API
- Display a custom welcome message
- Initialize the database with sample stock data
- Python 3.11
- Flask 3.0.3
- Flask-SQLAlchemy 3.0.3
- SQLite
- python-dotenv 1.0.1
Ensure you have the following installed:
- Python 3.11
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/marketcalls/opendash cd opendash
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file in the root directory and add the following:FLASK_STOCK_MARKET_DASHBOARD_API="Welcome to OpenDash" DATABASE_URL="sqlite:///default.db"
Alternatively, you can use the provided
.sample.env
as a template:cp .sample.env .env
-
Initialize the database:
flask shell from app import init_db init_db() exit()
To start the Flask development server:
flask run