Skip to main content

Buena Vista: A Programmable Postgres Proxy Server

Buena Vista is a Python library that provides a socketserver-based implementation of the Postgres wire protocol (PDF).

I started working on this project in order to address a common issue that people had when they were using another one of my Python projects, dbt-duckdb: when a long-running Python process is operating on a DuckDB database, you cannot connect to the DuckDB file using the CLI or with a database query tool like DBeaver to examine the state of the database, because each DuckDB file may only be open by a single process at a time. The Buena Vista library makes it possible to work with a DuckDB database from multiple different processes over the Postgres wire protocol, and the library makes it simple enough to run an example that illustrates the idea locally:

pip3 install buenavista
python3 -m buenavista.examples.duckdb_postgres <optional_duckdb_file>

in order to start a Postgres server on localhost:5433 backed by the DuckDB database file that you passed in at the command line (or by an in-memory DuckDB database if you do not specify an argument.) You should be able to query the database via psql in another window by running psql -h localhost -p 5433 (no database/username/password arguments required) or by using the DBeaver Postgres client connection.

Metadata

Release files for buenavista 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buenavista 0.5.0
File Size Uploaded
buenavista-0.5.0.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for buenavista 0.5.0
File Interpreter ABI Platform
buenavista-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.8 kB

Release files / buenavista-0.5.0.tar.gz

Download URL buenavista-0.5.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3997f9931e709a47b2606cfddd82cc05434119bbdb70de9a0c73f2f0565ef7b8
BLAKE2b-256 checksum
How to use checksums
a286c4058b8978ce1339b299308ff3bba698cd3ef1e0c3ef72933a96ddf4dcfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / buenavista-0.5.0-py3-none-any.whl

Download URL buenavista-0.5.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3281fa4f8fe05adc0c91b73c3ceaa26d9588a53e6eb4ca04a2e06fe28cca964
BLAKE2b-256 checksum
How to use checksums
0a90e600732d6f4c1b093dae769ea336606d0c0c50bea8769da42f0caf150691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page