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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30da43514c97db55e3f900dd122d46ec6c4d82eb6a66a7ee0118c613c535cf72
|
|
| MD5 |
96eb3a4b21c6c32936b48f0e059256b9
|
|
| BLAKE2b-256 |
9e3486f848bf68fd1c1401151b1d87f64eb3e5b71a91c99d7c764534b7839fc1
|
Provenance
The following attestation bundles were made for teleduck-0.1.1.tar.gz:
Publisher:
release-teleduck.yml on ybrs/riffq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teleduck-0.1.1.tar.gz -
Subject digest:
30da43514c97db55e3f900dd122d46ec6c4d82eb6a66a7ee0118c613c535cf72 - Sigstore transparency entry: 257972214
- Sigstore integration time:
-
Permalink:
ybrs/riffq@ef0a33528022e1643ba427d7a47bd33b9706cfea -
Branch / Tag:
refs/tags/rl-teleduck-0.1.1 - Owner: https://github.com/ybrs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-teleduck.yml@ef0a33528022e1643ba427d7a47bd33b9706cfea -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1070f981c3438c218dc7b6d7808969b6ff0cda960a175e78c5465a95f62084
|
|
| MD5 |
733c58463426a5d61f08aa18db933b47
|
|
| BLAKE2b-256 |
da5d6670041a9a4db330830b1da3e70771579b1599029a3f5bad70be466b7548
|
Provenance
The following attestation bundles were made for teleduck-0.1.1-py3-none-any.whl:
Publisher:
release-teleduck.yml on ybrs/riffq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teleduck-0.1.1-py3-none-any.whl -
Subject digest:
ac1070f981c3438c218dc7b6d7808969b6ff0cda960a175e78c5465a95f62084 - Sigstore transparency entry: 257972221
- Sigstore integration time:
-
Permalink:
ybrs/riffq@ef0a33528022e1643ba427d7a47bd33b9706cfea -
Branch / Tag:
refs/tags/rl-teleduck-0.1.1 - Owner: https://github.com/ybrs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-teleduck.yml@ef0a33528022e1643ba427d7a47bd33b9706cfea -
Trigger Event:
push
-
Statement type: