Skip to main content

Command line tool to split database urls into multiple environment variables.

Project description

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

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.3.5.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

zerotk_url2env-1.3.5-py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 3

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