Produces env vars from Heroku-style database URLs
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.8.tar.gz
(3.0 kB
view details)
File details
Details for the file zerotk_url2env-1.3.8.tar.gz.
File metadata
- Download URL: zerotk_url2env-1.3.8.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2159b124e3ce8a4fbe2837c389c75f5edefea94e6abdeb37d589f5da5dd35f96
|
|
| MD5 |
873a6c54881cdb0f8fac9b6785eec397
|
|
| BLAKE2b-256 |
1c381304905e85872cba37fb2e84887a293ceca87618c6ab63228bf36fd17a78
|