# 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/zerotk/url2env",
"name": "zerotk.url2env",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "postgresql shell environment",
"author": "Alexandre Andrade",
"author_email": "kaniabi@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1c/38/1304905e85872cba37fb2e84887a293ceca87618c6ab63228bf36fd17a78/zerotk_url2env-1.3.8.tar.gz",
"platform": null,
"description": "# url2env\n\nTurns database URLs into shell environment variables.\n\n### Usage:\n\n```\n$ url2env psql://joebloggs:secret@db.example.com:4433/blog\nPGUSER=joebloggs\nPGPASSWORD=secret\nPGHOST=db.example.com\nPGPORT=4433\nPGDATABASE=blog\n```\n\nWith all options:\n\n```\n$ url2env --engine --export --prefix=DB_ psql://joebloggs:secret@db.example.com:4433/blog\nexport DB_ENGINE=psql\nexport DB_USER=joebloggs\nexport DB_PASSWORD=secret\nexport DB_HOST=db.example.com\nexport DB_PORT=4433\nexport DB_DATABASE=blog\n```\n\n\nThe output could be used in conjunction with `eval`, e.g.::\n\n```\n$ eval $(url2env $DATABASE_URL)\n```\n\n\n### Installation\n\n```\n$ pip install zerotk.url2env\n```\n\n\n### Distribution\n\n```\n$ git tag <x.y>\n$ make build upload\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Produces env vars from Heroku-style database URLs",
"version": "1.3.8",
"project_urls": {
"Homepage": "https://github.com/zerotk/url2env"
},
"split_keywords": [
"postgresql",
"shell",
"environment"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1c381304905e85872cba37fb2e84887a293ceca87618c6ab63228bf36fd17a78",
"md5": "873a6c54881cdb0f8fac9b6785eec397",
"sha256": "2159b124e3ce8a4fbe2837c389c75f5edefea94e6abdeb37d589f5da5dd35f96"
},
"downloads": -1,
"filename": "zerotk_url2env-1.3.8.tar.gz",
"has_sig": false,
"md5_digest": "873a6c54881cdb0f8fac9b6785eec397",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3037,
"upload_time": "2024-11-19T15:13:25",
"upload_time_iso_8601": "2024-11-19T15:13:25.938206Z",
"url": "https://files.pythonhosted.org/packages/1c/38/1304905e85872cba37fb2e84887a293ceca87618c6ab63228bf36fd17a78/zerotk_url2env-1.3.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 15:13:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zerotk",
"github_project": "url2env",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "zerotk.url2env"
}