Skip to content

Commit 6f0fe97

Browse files
committed
docs: add Python package compatibility reference
List all 103 shipped pip packages (24 pre-imported, 79 on-demand), the standard library modules available, and the packages that cannot run in the Unikraft guest with reasons for each. Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent ec4ded1 commit 6f0fe97

1 file changed

Lines changed: 150 additions & 0 deletions

File tree

docs/python-packages.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Python package support
2+
3+
The python-agent-driver ships CPython 3.12 with the full standard library and 103 third-party pip packages.
4+
5+
## Standard library
6+
7+
The complete CPython 3.12 standard library is included. Commonly used modules:
8+
9+
| Module | Description |
10+
|--------|-------------|
11+
| `ast` | Abstract syntax tree |
12+
| `cProfile` | Deterministic profiling |
13+
| `csv` | CSV file reading/writing |
14+
| `datetime` | Date and time types |
15+
| `email` | Email handling |
16+
| `filecmp` | File and directory comparison |
17+
| `fnmatch` | Unix filename pattern matching |
18+
| `glob` | Unix-style pathname expansion |
19+
| `imaplib` | IMAP4 protocol client |
20+
| `json` | JSON encoder/decoder |
21+
| `os` | OS interfaces |
22+
| `pathlib` | Object-oriented filesystem paths |
23+
| `platform` | Platform identification |
24+
| `profile` | Python profiler |
25+
| `re` | Regular expressions |
26+
| `shutil` | High-level file operations |
27+
| `socket` | Low-level networking |
28+
| `ssl` | TLS/SSL wrapper |
29+
| `subprocess` | Subprocess management (shimmed) |
30+
| `tempfile` | Temporary files and directories |
31+
32+
Other standard library modules (`collections`, `itertools`, `functools`, `hashlib`, `struct`, `threading`, `typing`, `urllib`, `xml`, `zipfile`, `tarfile`, `sqlite3`, etc.) are also available.
33+
34+
## Pre-imported packages (zero import cost)
35+
36+
These packages are imported during `pyhl setup` warmup. They are already in `sys.modules` when your code runs, so `import` is instant.
37+
38+
| Package | Import name |
39+
|---------|-------------|
40+
| beautifulsoup4 | `bs4` |
41+
| chardet | `chardet` |
42+
| charset-normalizer | `charset_normalizer` |
43+
| click | `click` |
44+
| cryptography | `cryptography` |
45+
| httpx | `httpx` |
46+
| Jinja2 | `jinja2` |
47+
| lxml | `lxml` |
48+
| markdown-it-py | `markdown_it` |
49+
| numpy | `numpy` |
50+
| openpyxl | `openpyxl` |
51+
| pandas | `pandas` |
52+
| Pillow | `PIL` |
53+
| pydantic | `pydantic` |
54+
| pypdf | `pypdf` |
55+
| python-dateutil | `dateutil` |
56+
| python-docx | `docx` |
57+
| python-dotenv | `dotenv` |
58+
| python-pptx | `pptx` |
59+
| PyYAML | `yaml` |
60+
| requests | `requests` |
61+
| tabulate | `tabulate` |
62+
| tenacity | `tenacity` |
63+
| tqdm | `tqdm` |
64+
65+
## Shipped packages (import cost on first use)
66+
67+
These packages are in the rootfs but not pre-imported. The first `import` pays the usual module load cost.
68+
69+
| Package | Import name |
70+
|---------|-------------|
71+
| aiohttp | `aiohttp` |
72+
| altair | `altair` |
73+
| APScheduler | `apscheduler` |
74+
| bandit | `bandit` |
75+
| bokeh | `bokeh` |
76+
| boto3 | `boto3` |
77+
| builtwith | `builtwith` |
78+
| celery | `celery` |
79+
| coverage | `coverage` |
80+
| distro | `distro` |
81+
| docx2txt | `docx2txt` |
82+
| duckdb | `duckdb` |
83+
| edgartools | `edgartools` |
84+
| exchange-calendars | `exchange_calendars` |
85+
| fabric | `fabric` |
86+
| Faker | `faker` |
87+
| fastapi | `fastapi` |
88+
| feedparser | `feedparser` |
89+
| fpdf2 | `fpdf` |
90+
| gensim | `gensim` |
91+
| gitpython | `git` |
92+
| google-api-python-client | `googleapiclient` |
93+
| hypercorn | `hypercorn` |
94+
| hypothesis | `hypothesis` |
95+
| loguru | `loguru` |
96+
| markdown | `markdown` |
97+
| markdownify | `markdownify` |
98+
| mutagen | `mutagen` |
99+
| networkx | `networkx` |
100+
| nltk | `nltk` |
101+
| numpy-financial | `numpy_financial` |
102+
| odfpy | `odf` |
103+
| paramiko | `paramiko` |
104+
| pdfplumber | `pdfplumber` |
105+
| pdfrw | `pdfrw` |
106+
| pexpect | `pexpect` |
107+
| pipdeptree | `pipdeptree` |
108+
| platformdirs | `platformdirs` |
109+
| plotly | `plotly` |
110+
| polars | `polars` |
111+
| praw | `praw` |
112+
| pycountry | `pycountry` |
113+
| pydub | `pydub` |
114+
| pyflakes | `pyflakes` |
115+
| pygments | `pygments` |
116+
| pylint | `pylint` |
117+
| PyPDF2 | `PyPDF2` |
118+
| pytest | `pytest` |
119+
| pytest-asyncio | `pytest_asyncio` |
120+
| pytest-cov | `pytest_cov` |
121+
| pyxlsb | `pyxlsb` |
122+
| qrcode | `qrcode` |
123+
| radon | `radon` |
124+
| rapidfuzz | `rapidfuzz` |
125+
| rarfile | `rarfile` |
126+
| reportlab | `reportlab` |
127+
| rope | `rope` |
128+
| ruff | `ruff` |
129+
| schedule | `schedule` |
130+
| scikit-learn | `sklearn` |
131+
| scipy | `scipy` |
132+
| scrapy | `scrapy` |
133+
| send2trash | `send2trash` |
134+
| slack-sdk | `slack_sdk` |
135+
| srt | `srt` |
136+
| statsmodels | `statsmodels` |
137+
| svgwrite | `svgwrite` |
138+
| sympy | `sympy` |
139+
| textblob | `textblob` |
140+
| trafilatura | `trafilatura` |
141+
| tweepy | `tweepy` |
142+
| typer | `typer` |
143+
| typing-extensions | `typing_extensions` |
144+
| uvicorn | `uvicorn` |
145+
| vulture | `vulture` |
146+
| watchdog | `watchdog` |
147+
| websockets | `websockets` |
148+
| wordcloud | `wordcloud` |
149+
| xlrd | `xlrd` |
150+
| xlsxwriter | `xlsxwriter` |

0 commit comments

Comments
 (0)