# phi-gateway package now available on PyPI

**Published:** 2026-05-18T03:37:14.000Z  
**Topic:** OpenAI  
**Sentiment:** neutral  
**Publisher:** TrendWatcher — https://www.trendwatcher.in/article/acaa214c-c083-4500-afcf-8cf2c080d71c

phi-gateway 0.4.1 released on PyPI, a self‑hosted AI gateway offering LLM proxy, tool registry, RAG KB and agent memory—install with pip now.

phi‑gateway 0.4.1 was uploaded to the Python Package Index, making the self‑hosted AI gateway publicly installable via `pip install phi-gateway` [1]. The package bundles a FastAPI server that exposes a single OpenAI‑compatible endpoint and routes requests to providers such as OpenAI, Anthropic, Groq or OpenRouter, while also offering a tool registry, SQLite‑backed knowledge base and conversation memory.  

The distribution includes a source tarball of 64.3 KB and a wheel of 86.9 KB, both built with twine 6.2.0 on CPython 3.12.13 and uploaded without Trusted Publishing [1]. Documentation shows a quick‑start flow: launch the server with `uvicorn phi_gateway.main:app`, create an API key via a local POST request, then send chat completions to the gateway using the generated bearer token. A Docker compose setup is also provided for users who prefer containerised deployment.  

Internally, the gateway layers Caddy as a reverse proxy with automatic TLS, FastAPI for routing, and SQLite for persisting tool definitions, document embeddings and memory logs, consuming roughly 250 MB of idle RAM and requiring Python 3.12+ [1]. The project is open‑source under an MIT licence, with development scripts for editable installs, testing via pytest and code style enforcement using ruff.  

By publishing to PyPI, the maintainers lower the barrier for developers to integrate a flexible LLM proxy into their own applications, potentially accelerating adoption of multi‑provider AI workflows. Whether the community embraces phi‑gateway’s all‑in‑one approach or prefers more modular solutions remains to be seen.

## Sources
1. Pypi — [phi-gateway · PyPI](https://pypi.org/project/phi-gateway/)
2. Github — [GitHub - pemazzon/PHI-gateway: Gateway and services for the PHI](https://github.com/pemazzon/PHI-gateway)
3. Digitalocean — [How To Publish Python Packages to PyPI using Poetry... | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-publish-python-packages-to-pypi-using-poetry-on-ubuntu-22-04)
4. Stackoverflow — [python - Can't upload to PyPi with Twine - Stack Overflow](https://stackoverflow.com/questions/46606692/cant-upload-to-pypi-with-twine)

---
Cite as: TrendWatcher, "phi-gateway package now available on PyPI", https://www.trendwatcher.in/article/acaa214c-c083-4500-afcf-8cf2c080d71c
