Name | envo JSON |
Version |
1.5.4
JSON |
| download |
home_page | None |
Summary | Smart Environments handling - Define command hooks, file hooks and env variables in python and activate hot reloaded shells. |
upload_time | 2024-11-22 12:54:02 |
maintainer | None |
docs_url | None |
author | Damian Krystkiewicz |
requires_python | <4.0,>=3.8 |
license | Apache 2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
===========================================
envo - smart environment variables handling
===========================================
Define environmental variables in python and activate hot reloaded shells for them.
Features
--------
* Initialisation of variables in a given directory (creates common variables file too)
.. code-block::
user@pc:/project$ envo local --init # creates local environment python files
* Easy and dynamic handling in .py files (See documentation to learn more)
* Provides addons like handling virtual environments
.. code-block::
user@pc:/project$ envo local --init=venv # will add .venv to PATH
* Automatic env variables generation based on defined python variables
* Activating shells for a given environment
.. code-block::
user@pc:/project$ envo local
🐣(project)user@pc:/project$
🐣(project)user@pc:/project$ exit
user@pc:/project$ envo prod
🔥(project)user@pc:/project$
* Saving variables to a regular .env file
.. code-block::
user@pc:/project$ envo local dump
* Printing variables (handy for non interactive CLIs like CI or docker)
.. code-block::
user@pc:/project$ envo local dry-run
* Detects undefined variables.
* Perfect for switching kubernetes contexts and devops tasks
Example
#######
Initialising environment
.. code-block::
user@pc:/project$ envo local init
Will create :code:`env_comm.py` and :code:`env_local.py`
.. code-block:: python
# env_comm.py
class ProjectEnvComm(Env):
class Meta(Env.Meta):
name: str = "my_project'
verbose_run = True
def init(self) -> None:
super().init()
@command
def hello_world(self) -> None:
print("Hello world!")
ThisEnv = ProjectEnvComm
# env_local.py
class ProjectLocalEnv(ProjectEnvComm):
class Meta(ProjectEnvComm.Meta):
stage: str = "local"
emoji: str = "🐣"
def init(self) -> None:
super().init()
ThisEnv = ProjectLocalEnv
Example usage:
.. code-block::
user@pc:/project$ envo # short for "envo local"
🐣(my_project)user@pc:/project$ hello_world
Hello world!
Raw data
{
"_id": null,
"home_page": null,
"name": "envo",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Damian Krystkiewicz",
"author_email": "damian.krystkiewicz@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a7/78/419693e7f0f4395a82f8d5b4822420b691b57e0b07268baf975d9311ca61/envo-1.5.4.tar.gz",
"platform": null,
"description": "===========================================\nenvo - smart environment variables handling\n===========================================\n\nDefine environmental variables in python and activate hot reloaded shells for them.\n\nFeatures\n--------\n* Initialisation of variables in a given directory (creates common variables file too)\n\n.. code-block::\n\n user@pc:/project$ envo local --init # creates local environment python files\n\n* Easy and dynamic handling in .py files (See documentation to learn more)\n* Provides addons like handling virtual environments\n\n.. code-block::\n\n user@pc:/project$ envo local --init=venv # will add .venv to PATH\n\n* Automatic env variables generation based on defined python variables\n* Activating shells for a given environment\n\n.. code-block::\n\n user@pc:/project$ envo local\n \ud83d\udc23(project)user@pc:/project$\n \ud83d\udc23(project)user@pc:/project$ exit\n user@pc:/project$ envo prod\n \ud83d\udd25(project)user@pc:/project$\n\n\n* Saving variables to a regular .env file\n\n.. code-block::\n\n user@pc:/project$ envo local dump\n\n* Printing variables (handy for non interactive CLIs like CI or docker)\n\n.. code-block::\n\n user@pc:/project$ envo local dry-run\n\n* Detects undefined variables.\n* Perfect for switching kubernetes contexts and devops tasks\n\n\nExample\n#######\nInitialising environment\n\n.. code-block::\n\n user@pc:/project$ envo local init\n\n\nWill create :code:`env_comm.py` and :code:`env_local.py`\n\n.. code-block:: python\n\n # env_comm.py\n class ProjectEnvComm(Env):\n class Meta(Env.Meta):\n name: str = \"my_project'\n verbose_run = True\n\n def init(self) -> None:\n super().init()\n\n @command\n def hello_world(self) -> None:\n print(\"Hello world!\")\n\n\n ThisEnv = ProjectEnvComm\n\n # env_local.py\n class ProjectLocalEnv(ProjectEnvComm):\n class Meta(ProjectEnvComm.Meta):\n stage: str = \"local\"\n emoji: str = \"\ud83d\udc23\"\n\n def init(self) -> None:\n super().init()\n\n\n ThisEnv = ProjectLocalEnv\n\nExample usage:\n\n.. code-block::\n\n user@pc:/project$ envo # short for \"envo local\"\n \ud83d\udc23(my_project)user@pc:/project$ hello_world\n Hello world!\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Smart Environments handling - Define command hooks, file hooks and env variables in python and activate hot reloaded shells.",
"version": "1.5.4",
"project_urls": {
"homepage": "https://gitlab.com/plasma-opensource/envo"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "13c5f8c5ed13919a2dba271ee78f010dfe52caee07250d17cc59a8778d02f839",
"md5": "98d6434ef002efab8d7076eb7cd0556f",
"sha256": "6f24749063445620d4965bffb483f942e5186ec290627b05130ee75405e8c570"
},
"downloads": -1,
"filename": "envo-1.5.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98d6434ef002efab8d7076eb7cd0556f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 31105,
"upload_time": "2024-11-22T12:54:00",
"upload_time_iso_8601": "2024-11-22T12:54:00.974552Z",
"url": "https://files.pythonhosted.org/packages/13/c5/f8c5ed13919a2dba271ee78f010dfe52caee07250d17cc59a8778d02f839/envo-1.5.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a778419693e7f0f4395a82f8d5b4822420b691b57e0b07268baf975d9311ca61",
"md5": "1282df82df4d1fc0f28c1fbcc7fbb9ea",
"sha256": "3954731d350a17bf0c2fced201d125906ea611a2548f73b34578cc7b0c00d9ce"
},
"downloads": -1,
"filename": "envo-1.5.4.tar.gz",
"has_sig": false,
"md5_digest": "1282df82df4d1fc0f28c1fbcc7fbb9ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 25758,
"upload_time": "2024-11-22T12:54:02",
"upload_time_iso_8601": "2024-11-22T12:54:02.592074Z",
"url": "https://files.pythonhosted.org/packages/a7/78/419693e7f0f4395a82f8d5b4822420b691b57e0b07268baf975d9311ca61/envo-1.5.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-22 12:54:02",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "plasma-opensource",
"gitlab_project": "envo",
"lcname": "envo"
}