A Curated Collection of Python Implementations
A curated collection of practical Python code examples covering modern LLM integrations, web APIs, data processing, security tools, web scraping, and file manipulation. Each example is production-ready with proper error handling, security considerations, and clear documentation. Built by a developer who automates everything and believes good examples are better than lengthy tutorials.
Chat completions, streaming, function calling, JSON mode with GPT-4
Claude 3.5 integration with vision, streaming, and extended thinking
LangChain framework: chains, memory, RAG, and prompt templates
Type-safe structured outputs from LLMs using Pydantic
gRPC client-server implementation with protocol buffers
HTTP requests library examples for API interactions
Flask web framework with file uploads and routing
Scrapy spider for crawling and extracting web data
BeautifulSoup HTML parsing and DOM manipulation
NLTK sentiment analysis on text data
OpenCV face detection and recognition
Tor network integration for anonymous browsing
Shodan API for internet-connected device search
Cryptographic hashing with SHA-256 and other algorithms
PDF text extraction and querying
EXIF metadata extraction from images
# Clone the repository
git clone https://github.com/james-see/python-examples.git
cd python-examples
# Install dependencies (using uv)
uv sync --dev
# Run any example
cd python-examples
python requests-example.py