A Python-based desktop application that allows users to search and browse shoes from StockX, with various filtering options and direct links to purchase pages.
The Shoe Search Engine provides a user-friendly interface for searching and discovering shoes available on StockX. The application features real-time price updates, high-quality product images, and seamless integration with StockX's marketplace.
- Interactive search functionality
- Real-time price information
- High-quality product images
- Direct StockX purchase links
- Comprehensive filtering system
- Brand-specific searches
- Size availability checking
- Price range filtering
Simply enter your search term in the main search bar and click "Search":
def on_search():
search_term = searchbar.get()
size = size_var.get()
min_price = min_price_var.get()
max_price = max_price_var.get()
sort_by = sort_var.get()
brands = [brand.strip().lower() for brand in brand_var.get().split(',')]Enter brands in the brand entry field, separated by commas:
nike, adidas, reebok
The application supports various filtering options:
def get_shoes(search, size=None, min_price=None, max_price=None, sort_by=None, brands=None):
# Filter by size
if size:
price = next((variant["price"] for variant in item["variants"] if variant["size"] == size), None)
# Filter by price range
if min_price:
if price < min_price:
continue
if max_price:
if price > max_price:
continueThe following sorting methods are available:
- Price: Low to High
- Price: High to Low
- Most Relevant
- Brand
Each search result includes:
- Product image
- Product name
- Price
- Clickable link to StockX
Users can set:
- Minimum price threshold
- Maximum price threshold
- Sort by price (ascending or descending)
- Filter products by specific sizes
- Only shows products available in selected size
- Displays accurate pricing for selected size
- Search for specific brands
- Multiple brand selection supported
- Case-insensitive brand matching
-
Additional Filters
- Color options
- Release date
- Condition rating
-
Extended Options
- Saved searches
- Price alerts
- Wishlist functionality
-
Expanded Product Coverage
- More StockX categories
- Additional marketplace integrations
- Historical price data
The application uses threading for smooth performance:
def on_search():
# ... search parameter setup ...
threading.Thread(target=load_shoes, args=(search_term, size, min_price, max_price, sort_by, brands)).start()Image handling is optimized for performance:
def display_results(results):
for result in results:
if result['image']:
image = Image.open(io.BytesIO(image_data))
image.thumbnail((600, 600), Image.Resampling.LANCZOS)
photo = ImageTk.PhotoImage(image)The application implements secure API key handling using environment variables:
load_dotenv(dotenv_path='token.env')
API_KEY = os.environ.get('API_KEY')The application integrates with the SneakersAPI:
- API Endpoint:
https://api.sneakersapi.dev/api/v2/products - Authentication: Bearer token
- Response format: JSON
- Rate limiting: Implemented through threading
git clone github.com:raghavrat/ShoeSearchEngine.git
cd shoe-search-enginepip install tkinter pillow requests python-dotenv validators- Visit SneakersAPI and create an account
- Generate an API key from your dashboard
- Create a file named
token.envin the project root directory - Add your API key to the file:
API_KEY=your_api_key_herepython main.py