
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
FinPull is a comprehensive financial data scraping tool providing multiple interfaces for accessing financial market data. The package includes API, command-line, and graphical user interfaces, making it suitable for various use cases from automated trading systems to interactive data analysis.
pip install finpull
For API-only usage (lightweight):
pip install finpull-core
finpull
# Interactive mode
finpull --interactive
# Direct commands
finpull add AAPL GOOGL MSFT
finpull show AAPL --full
finpull export portfolio.xlsx --xlsx
finpull refresh
from finpull import FinancialDataAPI
api = FinancialDataAPI()
result = api.add_ticker("AAPL")
data = api.get_data("AAPL")
if data['success']:
stock_info = data['data']
print(f"Company: {stock_info['company_name']}")
print(f"Price: ${stock_info['price']}")
print(f"Market Cap: {stock_info['market_cap']}")
Comprehensive benchmarks on typical hardware with 10 test runs each:
| Metric | Core Package | Full Package | Difference |
|---|---|---|---|
| Package Size | 21.9 KB | 27.2 KB | +5.3 KB (+24.2%) |
| Installed Size | 134 KB | 188 KB | +54 KB (+40.3%) |
| Import Time (cached) | 0.0002s | 0.0002s | No difference |
| Dependencies | 3 packages | 4 packages | +openpyxl |
Launch: finpull or finpull --gui
Features:
Launch: finpull --interactive or direct commands
Available Commands:
add <tickers> - Add ticker symbols for trackingremove <tickers> - Remove tickers from trackingshow [ticker] [--full] - Display ticker informationrefresh [ticker] - Update data from sourcesexport <filename> [--json] [--csv] [--xlsx] - Save data to filesstats - Show system statistics and healthclear - Remove all tracked data (with confirmation)Features:
finpull> prompt) for explorationImport: from finpull import FinancialDataAPI, FinancialDataScraper
Classes:
Features:
Provides 27 financial metrics per ticker across all categories: basic info, valuation ratios, earnings, profitability, growth, financial position, and market data. Uses Finviz and Yahoo Finance with automatic failover for high reliability.
# Custom storage location
export FINPULL_STORAGE_FILE="/path/to/custom/storage.json"
# Rate limiting (seconds between requests)
export FINPULL_RATE_LIMIT="2"
# Logging level (DEBUG, INFO, WARNING, ERROR)
export FINPULL_LOG_LEVEL="INFO"
# GUI theme (if supported)
export FINPULL_GUI_THEME="default"
Data is persisted locally in JSON format with automatic backups:
~/.finpull/data.json%USERPROFILE%\.finpull\data.jsonBuilt-in intelligent rate limiting prevents API blocks:
Supports browser integration via Pyodide and Node.js via CLI commands. See main repository README for complete integration examples and code samples.
finpull/
├── Core Package (finpull-core)
│ ├── API interface
│ ├── Data scraping engine
│ ├── Storage management
│ └── Utility functions
└── Interface Extensions
├── Command-line interface
├── Graphical user interface
└── Excel export functionality
The full package depends on finpull-core for core functionality, ensuring:
from finpull import FinancialDataAPI
api = FinancialDataAPI()
# Build a technology portfolio
tech_stocks = ["AAPL", "GOOGL", "MSFT", "AMZN", "TSLA", "META", "NVDA"]
results = api.batch_add_tickers(tech_stocks)
print(f"Successfully added {results['summary']['added_count']} stocks")
# Analyze portfolio performance
portfolio_data = api.get_data()
for stock in portfolio_data['data']:
print(f"{stock['ticker']}: ${stock['price']} | P/E: {stock['pe_ratio']} | Cap: {stock['market_cap']}")
#!/bin/bash
# Daily portfolio update script
echo "Updating portfolio..."
# Add new stocks if needed
finpull add AAPL GOOGL MSFT
# Refresh all data
finpull refresh
# Generate reports
finpull export "reports/portfolio_$(date +%Y%m%d)" --json --csv --xlsx
# Show summary
finpull show --full
echo "Portfolio update complete"
import time
from finpull import FinancialDataAPI
api = FinancialDataAPI()
# Add watchlist
watchlist = ["AAPL", "GOOGL", "MSFT", "TSLA"]
api.batch_add_tickers(watchlist)
while True:
# Refresh data every 5 minutes
api.refresh_data()
# Check for significant changes
data = api.get_data()
for stock in data['data']:
change_5y = float(stock['change_5y'].replace('%', ''))
if abs(change_5y) > 10: # More than 10% change
print(f"Alert: {stock['ticker']} changed {change_5y}% over 5 years")
time.sleep(300) # 5 minutes
import threading
from finpull import FinancialDataGUI
def setup_automated_gui():
gui = FinancialDataGUI()
# Pre-populate with data
gui.scraper.add_ticker("AAPL")
gui.scraper.add_ticker("GOOGL")
gui.refresh_display()
# Run GUI in separate thread
gui_thread = threading.Thread(target=gui.run)
gui_thread.start()
return gui
# Launch automated GUI session
gui = setup_automated_gui()
import logging
from finpull import FinancialDataAPI
# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
api = FinancialDataAPI()
def safe_operation(ticker):
try:
result = api.add_ticker(ticker)
if result['success']:
logger.info(f"Successfully added {ticker}")
return True
else:
logger.warning(f"Failed to add {ticker}: {result.get('error')}")
return False
except Exception as e:
logger.error(f"Exception for {ticker}: {e}")
return False
# Safe batch processing
tickers = ["AAPL", "INVALID", "GOOGL", "MSFT"]
successful = [t for t in tickers if safe_operation(t)]
print(f"Successfully processed {len(successful)}/{len(tickers)} tickers")
MIT License - see LICENSE file for details.
FAQs
Complete financial data scraper with CLI, GUI, and API interfaces
We found that finpull demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.