Skip to main content

Produces env vars from Heroku-style database URLs

Project description

Turns Heroku-style database URLs into shell environment variables.

Currently only produces psql-compatible envs from postgres:// URLs.

Example:

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

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

$ env $(url2env $SOME_DB_URL) psql

Installation instructions

$ pip install url2env

Distribution instructions

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

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

zerotk.url2env-1.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

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