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
Note: requires Python 3.
$ pip install url2env
Distribution instructions
(For my reference):
$ virtualenv env $ env/bin/python setup.py bdist_wheel $ env/bin/pip install twine $ env/bin/twine upload dist/*
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
url2env-1.0-py3-none-any.whl
(3.6 kB
view details)
File details
Details for the file url2env-1.0-py3-none-any.whl
.
File metadata
- Download URL: url2env-1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3bc67ce2421cfa60e0950c06caea9c4334ddca73dbbad0b6bdfd54c8038641e |
|
MD5 | ecdd9d65785f3491b12ec95151787407 |
|
BLAKE2b-256 | f68b8b357760b046845a50553242303241e55ce826bb717bd4f3dc415940b54f |