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
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
zerotk_url2env-1.3.5.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for zerotk_url2env-1.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 702bfd2d68df5fe629997643201584ea5c2ba6fc11a9f5a7b538f06be1c8b06d |
|
MD5 | 1a614c98484911a02a8d2444a5c0cfdd |
|
BLAKE2b-256 | 205641fb052a6f999289afc4264d697a50a834b51d5a0aa81758589a54b09428 |