{"id":24411,"library":"pytablereader","title":"pytablereader","description":"pytablereader is a Python library to load structured table data from files, strings, or URLs supporting multiple formats: CSV, Excel, Google Sheets, HTML, JSON, LDJSON, LTSV, Markdown, SQLite, TSV. Currently at v0.31.4, with a monthly/bimonthly release cadence and active maintenance.","status":"active","version":"0.31.4","language":"python","source_language":"en","source_url":"https://github.com/thombashi/pytablereader","tags":["table","csv","excel","google-sheets","html","json","sqlite","markdown","data-loading"],"install":[{"cmd":"pip install pytablereader","lang":"bash","label":"Install core library"},{"cmd":"pip install pytablereader[excel]","lang":"bash","label":"Install with Excel support (openpyxl)"},{"cmd":"pip install pytablereader[html]","lang":"bash","label":"Install with HTML support (lxml)"},{"cmd":"pip install pytablereader[gs]","lang":"bash","label":"Install with Google Sheets support (gspread)"}],"dependencies":[{"reason":"Database loading support","package":"SimpleSQLite","optional":false},{"reason":"Path validation","package":"pathvalidate","optional":false},{"reason":"Excel file reading","package":"openpyxl","optional":true},{"reason":"HTML/XML parsing","package":"lxml","optional":true},{"reason":"Google Sheets access","package":"gspread","optional":true}],"imports":[{"note":"You must import the specific function; the module does not expose it in __init__.py directly?","wrong":"import pytablereader","symbol":"load_tables","correct":"from pytablereader import load_tables"},{"note":"The public API is at the top-level.","wrong":"from pytablereader.loader import TableFileLoader","symbol":"TableFileLoader","correct":"from pytablereader import TableFileLoader"},{"symbol":"TableUrlLoaderFactory","correct":"from pytablereader import TableUrlLoaderFactory"}],"quickstart":{"code":"from pytablereader import load_tables\n\n# Load CSV from URL\ntables = load_tables('https://raw.githubusercontent.com/thombashi/pytablereader/master/example.csv')\nfor table in tables:\n    print(table)\n\n# Load from file\nwith open('data.csv') as f:\n    tables = load_tables(f)\n    for table in tables:\n        print(table)","lang":"python","description":"Basic usage: load table data from a file path, URL, or file-like object. The function returns a generator of TableData objects."},"warnings":[{"fix":"Use Python 3.7+ and update any Python 2 specific code.","message":"Dropped Python 2 support in v0.28.0. Code using Python 2 idioms will break.","severity":"breaking","affected_versions":">=0.28.0"},{"fix":"Pass type_hints=True to load_tables or loader classes to enable type detection.","message":"The old type detection for CSV was disabled by default in v0.31.0. Use type_hints argument explicitly if you need automatic type detection.","severity":"deprecated","affected_versions":">=0.31.0"},{"fix":"Set up gspread authentication (service account or OAuth) before calling load_tables with a Google Sheets URL.","message":"When using Google Sheets, the library requires authentication via gspread. If oauth2 credentials are not set, loading will fail with auth errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure file paths are valid for the platform; use raw strings or os.path functions.","message":"File paths with special characters may cause path validation errors on some platforms. The library uses pathvalidate for validation.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install pytablereader[all]` or install specific extras as needed.","cause":"Library not installed or installed without required extras.","error":"ModuleNotFoundError: No module named 'pytablereader'"},{"fix":"Update pytablereader to >=0.29.0 with `pip install --upgrade pytablereader`.","cause":"Possibly using an older version where the function was not exposed.","error":"ImportError: cannot import name 'load_tables' from 'pytablereader'"},{"fix":"Use one of: csv, tsv, json, ltsv, markdown, excel, html, sqlite, gs. Check formatting parameter.","cause":"Unsupported file format string passed.","error":"ValueError: The specified format is not supported: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}