pyseoa

pyseoa

PyPI

๐Ÿš€ Python SEO Analyzer โ€” CLI, Library & Web ๐Ÿ“ฆ

pyseoa is a modern, threadโ€‘ready Python toolkit for deepโ€‘dive SEO audits.
Use it as a library, CLI tool, or integrate with FastAPI for web apps.


๐Ÿ” Features (v0.2.3)

  • โœ… Single & Batch Analysis
    • Run SEO checks on one or multiple URLs via crawl or direct URL
    • Smart internal link crawling and multithreading for performance
  • โš™๏ธ Feature Flags Easily enable or disable checks via bitflags:
    • Title, Meta description, H1, Image alts
    • Canonical, OpenGraph, Twitter meta
    • Robots.txt, Sitemap, Favicon
    • Accessibility hints, Structured Data (JSONโ€‘LD), Mobile-friendliness
    • Keyword density (with custom allow/deny lists)
    • Hreflang, Metaโ€‘robots, Web Vitals, AMP compliance
  • ๐Ÿ“„ Exporters
    • JSON, CSV, Markdown
    • Fancy HTML report with styles
    • PDF (via FPDF)
    • Terminal summary
  • ๐Ÿ”„ Threaded Workflow
    • Multi-threaded crawling, analysis, and exporting
    • Optional progress bars via tqdm
  • ๐Ÿ CLI Tool & API Support
    • Run via pyseoโ€‘analyze CLI:
      seo-analyze https://example.com --crawl --export html
      
    • Fully importable โ€” works great with FastAPI, Flask, Streamlit, Dash, etc.

โšก Install

pip install pyseoa
# or, specify version:
pip install pyseoa==0.2.3

๐Ÿงพ Basic Library Example

from pyseoa import SmartBatchSEOAnalyzer

urls = ["https://example.com", "https://another.com"]
analyzer = SmartBatchSEOAnalyzer(urls, follow_links=True)
analyzer.run_batch_analysis()

# Save outputs
analyzer.exporters.json.export(analyzer.results)
analyzer.exporters.csv.export(analyzer.results)
analyzer.exporters.html.export(analyzer.results, output="report.html")

๐Ÿƒโ€โ™‚๏ธ CLI Usage

Analyze a single site:

seo-analyze https://example.com

Batch or crawled analysis:

seo-analyze --crawl --export html urls.txt

Run seo-analyze --help for full options list.


๐Ÿงฉ Integration with Web Apps

E.g. With FastAPI or Flask in your web project:

from fastapi import FastAPI, Form
from pyseoa import SmartBatchSEOAnalyzer

app = FastAPI()

@app.post("/analyze")
def analyze(url: str = Form(...), crawl: bool = Form(False)):
    analyzer = SmartBatchSEOAnalyzer([url], follow_links=crawl)
    analyzer.run_batch_analysis()
    return analyzer.results

๐Ÿ”ง Command-Line Installer

Install via Git:

git clone https://github.com/sempre76/pyseoa.git
cd pyseoa
pip install -e .

๐Ÿ“ฆ Whatโ€™s New in v0.2.x

  • Dynamic internal link crawling
  • Feature flags overhaul
  • New exporters: Markdown, PDF, Terminal
  • Multi-threaded pipelines with progress bars
  • Web integration: SmartBatchAnalyzer & FastAPI-ready

๐Ÿ‘ฅ Contributing

PRs welcome! Please check:

  • Code: pip install ., run basic analyzers
  • Tests: run under example projects or use CLI
  • Docs: update examples & feature flags in README

๐Ÿ“œ License & Author

  • MIT License โ€“ see the LICENSE file
  • Maintained by masem โ€“ contact: contact@masem.at