Skip to main content

Serve DuckDB over PostgreSQL protocol using riffq

Project description

Teleduck

Teleduck exposes a DuckDB database over the PostgreSQL protocol using riffq. Simply run:

teleduck mydata.db

and connect with any PostgreSQL client.

Command line options

Teleduck serves the PostgreSQL protocol over TLS by default. The command line interface accepts the following options:

teleduck [OPTIONS] DB_FILE
  • --host – host interface to listen on (default: 127.0.0.1)
  • --port – port number (default: 5433)
  • --sql-script – path to a SQL script file to execute before the server starts. Can be given multiple times to run several scripts in order.
  • --sql – SQL statement executed before the server starts. Can be specified multiple times. Use this to attach other DuckDB databases or run any initialisation queries before Teleduck begins accepting connections.
  • --use-tls/--no-use-tls – enable or disable TLS (default: enabled)
  • --tls-cert-file – path to a TLS certificate file. If not provided the built in certificate is used.
  • --tls-key-file – path to the TLS private key file. If not provided the built in key is used.

Generating certificates

You can generate a self‑signed certificate using openssl:

openssl req -x509 -newkey rsa:2048 -nodes -keyout server.key \
  -out server.crt -days 365 -subj "/CN=localhost"

Use --tls-cert-file server.crt --tls-key-file server.key to provide the files to Teleduck.

Authentication

Teleduck accepts any username and password by default. Set the following environment variables to require a particular user or password:

  • TELEDUCK_USERNAME – expected username.
  • TELEDUCK_PASSWORD – expected password.
  • TELEDUCK_PASSWORD_SHA1 – SHA1 hash of the expected password.

Example of setting credentials:

export TELEDUCK_USERNAME=myuser
export TELEDUCK_PASSWORD=mypassword
# alternatively use a SHA1 hash
export TELEDUCK_PASSWORD_SHA1=$(echo -n mypassword | sha1sum | awk '{print $1}')

If none of these variables are defined Teleduck allows any credentials.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teleduck-0.1.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teleduck-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file teleduck-0.1.1.tar.gz.

File metadata

  • Download URL: teleduck-0.1.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for teleduck-0.1.1.tar.gz
Algorithm Hash digest
SHA256 30da43514c97db55e3f900dd122d46ec6c4d82eb6a66a7ee0118c613c535cf72
MD5 96eb3a4b21c6c32936b48f0e059256b9
BLAKE2b-256 9e3486f848bf68fd1c1401151b1d87f64eb3e5b71a91c99d7c764534b7839fc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for teleduck-0.1.1.tar.gz:

Publisher: release-teleduck.yml on ybrs/riffq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teleduck-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: teleduck-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for teleduck-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac1070f981c3438c218dc7b6d7808969b6ff0cda960a175e78c5465a95f62084
MD5 733c58463426a5d61f08aa18db933b47
BLAKE2b-256 da5d6670041a9a4db330830b1da3e70771579b1599029a3f5bad70be466b7548

See more details on using hashes here.

Provenance

The following attestation bundles were made for teleduck-0.1.1-py3-none-any.whl:

Publisher: release-teleduck.yml on ybrs/riffq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page