https://github.com/pythoninthegrass/get_stocks
Get one or more stocks and store them in a local database
https://github.com/pythoninthegrass/get_stocks
python urllib
Last synced: 9 months ago
JSON representation
Get one or more stocks and store them in a local database
- Host: GitHub
- URL: https://github.com/pythoninthegrass/get_stocks
- Owner: pythoninthegrass
- License: unlicense
- Created: 2024-12-17T21:34:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-07T23:34:11.000Z (12 months ago)
- Last Synced: 2025-05-07T05:09:31.736Z (9 months ago)
- Topics: python, urllib
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# get_stocks
## Minimum Requirements
* [python 3.11+](https://www.python.org/downloads/)
## Setup
```bash
git clone https://github.com/pythoninthegrass/get_stocks.git
cd stocks
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
```
## Quickstart
```bash
export TICKERS="tsla,ibm,aapl" # default: aapl
export DROP_DB=true # default: false
export TTL=5 # default: 5 (minutes)
λ ./get_stocks.py
Ticker: tsla Price: 479.86
Ticker: ibm Price: 228.97
Ticker: aapl Price: 253.48
```
## Further Reading
* [PatzEdi/Stockstir: Easily gather stock data of any company in any of your Python projects](https://github.com/PatzEdi/Stockstir)