This project has been archived by its maintainers, and is no longer receiving any updates.
Portus: NL queries for data
Setup connection
from sqlalchemy import create_engine
engine = create_engine(
"postgresql://readonly_role:>sU9y95R(e4m@ep-young-breeze-a5cq8xns.us-east-2.aws.neon.tech/netflix"
)
Create portus session
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
session = portus.open_session(llm)
session.add_db(engine)
Query data
session.ask("list all german shows").df()
Local models
Portus can be used with local LLMs either using ollama or OpenAI API compatible servers (LM Studio, llama.cpp, etc.).
Ollama
- Install ollama for your operating system and make sure it is running.
- Use an LLMConfig with
nameof the formollama:model_name. For an example see qwen3-8b-ollama.yaml.
The model will be downloaded automatically if it doesn't already exist.
Alternatively, ollama pull model_name to download the model manually.
OpenAI compatible servers
You can use any OAI compatible server by setting api_base_url in the LLMConfig. For an example, see qwen3-8b.yaml.
Examples of OAI compatible servers:
Metadata
Release files for portus-ai 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| portus_ai-0.0.4.tar.gz | 19.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| portus_ai-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.3 kB
Release files / portus_ai-0.0.4.tar.gz
| Download URL | portus_ai-0.0.4.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db979fb2c6e69983285c291bf505a13f57c119981b423dc519c831733d197876
|
|
BLAKE2b-256 checksum How to use checksums |
297c92c27d2d1afbffdf77e7de16166c25c47cbc643c11faec1d6a03af964ea4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Release files / portus_ai-0.0.4-py3-none-any.whl
| Download URL | portus_ai-0.0.4-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47081a8b2cd1e6455ea75b7e5cba3342aab5c7ff832f1ddb18920d6bc684698b
|
|
BLAKE2b-256 checksum How to use checksums |
743ac2ef5d197b433b33ed144ce338bacda4e6f8be8e90d7be777cbb6547b6ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Security for portus-ai 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.