{
"info": {
"author": "Sebastian Vetter",
"author_email": "seb@roadsi.de",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython"
],
"description": "lektor-envvars\n##############\n\n.. image:: https://circleci.com/gh/elbaschid/lektor-envvars.svg?style=svg\n :target: https://circleci.com/gh/elbaschid/lektor-envvars\n\n\nWhy this project?\n-----------------\n\n**TL;DR** You can use environment variables in your Lektor templates.\n\nI've been working with `Lektor `_ as as\nstatic site generator in quite a few projects and really enjoy it. Most recently\nI work on a project that used an environment variable to create slightly\ndifferent version of the site for ``development``, ``staging`` and ``production``.\n\nLektor doesn't have a way to add *environment variables* into the templates, so\nI started building my own little plugin.\n\n\nHow to install it in Lektor\n---------------------------\n\nYou can easily install this plugin following the `Lektor docs\n`_. All you need to do is run::\n\n $ lektor plugin add lektor-envvars\n\nThis will automatically install the plugin and add it to your project\nconfiguration.\n\n\nUsing environment variables\n---------------------------\n\nYou are able to access environment variables using the ``envvars`` function\ninside your Jinja2 template. This function is added whenever lektor is running\na new build. \n\nAll environment variables are prefixed with ``LEKTOR_`` by default. Let's look\nat a simple example with an environment varialbe ``LEKTOR_DEBUG=true``::\n\n $ export LEKTOR_DEBUG=true\n\nYou can access this variable inside any Jinja2 template::\n\n {{ envvars('DEBUG') }}\n\nwhich will display ``true`` instead.\n\n\nConverting values\n-----------------\n\nThat's a great start but what if you want this to be a boolean value instead of\nthe string ``true``? You simply convert the value::\n\n {{ envvars('DEBUG', bool) }}\n\nor you can now even do::\n\n {% if envvars('DEBUG', bool) %}\n ...\n {% endif %}\n\n\nCustom prefixes (or no prefix)\n------------------------------\n\nIf you don't like the ``LEKTOR_`` prefix, you can either use your own prefix by\nsetting the prefix in the ``configs/lektor-envvars.ini`` file::\n\n [envvars]\n prefix = MY_OWN_\n\nYou can now use ``MY_OWN_DEBUG`` instead of ``LEKTOR_DEBUG``. This means that\nall environment variables need to be prefixed with ``MY_OWN_`` now instead.\n\nYou can also ignore the prefix all together::\n\n {{ envvars('DEBUG', no_prefix=True) }}\n\nwhich will give you access to the environment variable ``DEBUG``.\n\n\nLicense\n-------\n\nThis code is licensed under the `MIT License`_.\n\n.. _`MIT License`: https://github.com/elbaschid/lektor-envvars/blob/master/LICENSE\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://www.github.com/elbaschid/lektor-envvars",
"keywords": "",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "lektor-envvars",
"package_url": "https://pypi.org/project/lektor-envvars/",
"platform": "",
"project_url": "https://pypi.org/project/lektor-envvars/",
"project_urls": {
"Homepage": "https://www.github.com/elbaschid/lektor-envvars"
},
"release_url": "https://pypi.org/project/lektor-envvars/18.6.12.4/",
"requires_dist": [
"lektor",
"environs"
],
"requires_python": "",
"summary": "A Lektor plugin making environment variables available in templates.",
"version": "18.6.12.4"
},
"last_serial": 3956451,
"releases": {
"18.6.12.1": [
{
"comment_text": "",
"digests": {
"md5": "3007181f2b163ea443951346873a76dd",
"sha256": "51eb5c195bb1f83931ba4fd072ac980e5f0ca5fbf5535d13a13a3fc19d9e3a67"
},
"downloads": -1,
"filename": "lektor_envvars-18.6.12.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3007181f2b163ea443951346873a76dd",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2680,
"upload_time": "2018-06-13T04:41:23",
"url": "https://files.pythonhosted.org/packages/ec/7a/7d1cbf267b2a03fd8fca2e33b8a194276639eb8183a26d8b09d5707effdd/lektor_envvars-18.6.12.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2437287717974d6ec2d02b5b0ebffec7",
"sha256": "40fa3d1459fea29728385e5371616dc1dafb28cb59338a123aec38061553dacc"
},
"downloads": -1,
"filename": "lektor-envvars-18.6.12.1.tar.gz",
"has_sig": false,
"md5_digest": "2437287717974d6ec2d02b5b0ebffec7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3417,
"upload_time": "2018-06-13T04:41:24",
"url": "https://files.pythonhosted.org/packages/05/a7/f6da090ac4593e84074161b179a824f5c883ad30744082de2d155097f440/lektor-envvars-18.6.12.1.tar.gz"
}
],
"18.6.12.2": [
{
"comment_text": "",
"digests": {
"md5": "04205a421fa66c6c6ba15fe458a3799a",
"sha256": "acb9ae10c1ac6481f209ade11650d342699bc91241ec795ee2c5f533b08a20b5"
},
"downloads": -1,
"filename": "lektor_envvars-18.6.12.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "04205a421fa66c6c6ba15fe458a3799a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2682,
"upload_time": "2018-06-13T04:54:20",
"url": "https://files.pythonhosted.org/packages/a6/db/b1a7ce66d9e97d2d11c2f04afb59b8926c8c7503c86a6a2dec1457e75779/lektor_envvars-18.6.12.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "9109b990fc7530074402fc62f218a633",
"sha256": "215c172f735094f261ab3ff6d8ef289a253625f1f0cefbacc7078bd0aa1fe2a6"
},
"downloads": -1,
"filename": "lektor-envvars-18.6.12.2.tar.gz",
"has_sig": false,
"md5_digest": "9109b990fc7530074402fc62f218a633",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3422,
"upload_time": "2018-06-13T04:54:22",
"url": "https://files.pythonhosted.org/packages/f1/40/b3994365fef01497ac725276fb54244dd58499e37a43cffa1bdb66357ba0/lektor-envvars-18.6.12.2.tar.gz"
}
],
"18.6.12.3": [
{
"comment_text": "",
"digests": {
"md5": "2e547bc3760f2771d49604f2a6778a88",
"sha256": "30d15c3343b97c061f2e99550e85a99d65eb6825b5884407e0ce04b72d93a812"
},
"downloads": -1,
"filename": "lektor_envvars-18.6.12.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "2e547bc3760f2771d49604f2a6778a88",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 3180,
"upload_time": "2018-06-13T05:22:32",
"url": "https://files.pythonhosted.org/packages/80/11/44a1549a566a5e349dedf0ad3e1d5c98706307c03dad65b70c61b681210a/lektor_envvars-18.6.12.3-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "846017d44c404960aa7b8b5dbeb0d270",
"sha256": "dc05322826a9069b69b714c354bf51b08e43b71c42a79eae4af6831a8564d2a0"
},
"downloads": -1,
"filename": "lektor-envvars-18.6.12.3.tar.gz",
"has_sig": false,
"md5_digest": "846017d44c404960aa7b8b5dbeb0d270",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3604,
"upload_time": "2018-06-13T05:22:33",
"url": "https://files.pythonhosted.org/packages/a7/3e/4e4fe406c3db0b49b68035fb5d06715b1466b13ff9030bd01cffbfd1ae94/lektor-envvars-18.6.12.3.tar.gz"
}
],
"18.6.12.4": [
{
"comment_text": "",
"digests": {
"md5": "dadfc678f9c296c2838e3bc8468ad074",
"sha256": "8c2de6df4277347f5b848fe0129643474e54930187142af595327c3c603333a2"
},
"downloads": -1,
"filename": "lektor_envvars-18.6.12.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "dadfc678f9c296c2838e3bc8468ad074",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 3181,
"upload_time": "2018-06-13T05:32:12",
"url": "https://files.pythonhosted.org/packages/05/e3/cac22583b8fedbedb620bdf26b15b8ecdac97d194ad76fc6b5e24dab2304/lektor_envvars-18.6.12.4-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "b91fcf99205923a96d984dcd32010ad6",
"sha256": "1c22f06495d51256d8a3365c4a22b39f9dabda2ac4adac9558f11ff688d6245d"
},
"downloads": -1,
"filename": "lektor-envvars-18.6.12.4.tar.gz",
"has_sig": false,
"md5_digest": "b91fcf99205923a96d984dcd32010ad6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3605,
"upload_time": "2018-06-13T05:32:13",
"url": "https://files.pythonhosted.org/packages/9b/ef/864f0a19332ee808c22435ee3d40b9f79ebdf1f71e91a5f5f15f437ce539/lektor-envvars-18.6.12.4.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "dadfc678f9c296c2838e3bc8468ad074",
"sha256": "8c2de6df4277347f5b848fe0129643474e54930187142af595327c3c603333a2"
},
"downloads": -1,
"filename": "lektor_envvars-18.6.12.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "dadfc678f9c296c2838e3bc8468ad074",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 3181,
"upload_time": "2018-06-13T05:32:12",
"url": "https://files.pythonhosted.org/packages/05/e3/cac22583b8fedbedb620bdf26b15b8ecdac97d194ad76fc6b5e24dab2304/lektor_envvars-18.6.12.4-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "b91fcf99205923a96d984dcd32010ad6",
"sha256": "1c22f06495d51256d8a3365c4a22b39f9dabda2ac4adac9558f11ff688d6245d"
},
"downloads": -1,
"filename": "lektor-envvars-18.6.12.4.tar.gz",
"has_sig": false,
"md5_digest": "b91fcf99205923a96d984dcd32010ad6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3605,
"upload_time": "2018-06-13T05:32:13",
"url": "https://files.pythonhosted.org/packages/9b/ef/864f0a19332ee808c22435ee3d40b9f79ebdf1f71e91a5f5f15f437ce539/lektor-envvars-18.6.12.4.tar.gz"
}
]
}