Skip to main content

url2env

Turns database URLs into shell environment variables.

Usage:

$ url2env psql://joebloggs:secret@db.example.com:4433/blog
PGUSER=joebloggs
PGPASSWORD=secret
PGHOST=db.example.com
PGPORT=4433
PGDATABASE=blog

With all options:

$ url2env --engine --export --prefix=DB_ psql://joebloggs:secret@db.example.com:4433/blog
export DB_ENGINE=psql
export DB_USER=joebloggs
export DB_PASSWORD=secret
export DB_HOST=db.example.com
export DB_PORT=4433
export DB_DATABASE=blog

The output could be used in conjunction with eval, e.g.::

$ eval $(url2env $DATABASE_URL)

Installation

$ pip install zerotk.url2env

Distribution

$ git tag <x.y>
$ make build upload

Metadata

Release files for zerotk.url2env 1.3.1

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

Source distribution (sdist)

Source distribution for zerotk.url2env 1.3.1
File Size Uploaded
zerotk.url2env-1.3.1.tar.gz 3.0 kB Details

Release files / zerotk.url2env-1.3.1.tar.gz

Download URL zerotk.url2env-1.3.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2fdb40b5cc39b35466753ed72fdd825312e5252a08f48e7dc2f4538c53f41bcd
BLAKE2b-256 checksum
How to use checksums
94aa305b13af329a1a1ab42b18bf602f8ee5e2a9950319a5b1bff2174add3b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5
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