which-env


Namewhich-env JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryA Python library for intelligent multi-environment deployment strategy management with automatic runtime-based environment detection.
upload_time2025-09-06 15:39:33
maintainerSanhe Hu
docs_urlNone
authorSanhe Hu
requires_python<4.0,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements enum-mate which-runtime
Travis-CI No Travis.
coveralls test coverage
            
.. image:: https://readthedocs.org/projects/which-env/badge/?version=latest
    :target: https://which-env.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/which_env-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/which_env-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/which_env-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/which_env-project

.. image:: https://img.shields.io/pypi/v/which-env.svg
    :target: https://pypi.python.org/pypi/which-env

.. image:: https://img.shields.io/pypi/l/which-env.svg
    :target: https://pypi.python.org/pypi/which-env

.. image:: https://img.shields.io/pypi/pyversions/which-env.svg
    :target: https://pypi.python.org/pypi/which-env

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/which_env-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/which_env-project

------

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://which-env.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/which_env-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/which_env-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/which_env-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/which-env#files


Welcome to ``which_env`` Documentation
==============================================================================
.. image:: https://which-env.readthedocs.io/en/latest/_static/which_env-logo.png
    :target: https://which-env.readthedocs.io/en/latest/

Managing multiple deployment environments (dev, staging, production) is essential for safe software delivery, but manually specifying environments leads to configuration errors and inconsistent deployments. ``which_env`` solves this by providing intelligent environment detection that adapts to your runtime context - defaulting to development locally while automatically detecting the correct environment in CI/CD pipelines and production deployments.

The library uses a simple inheritance pattern where you define your project's environments once, then rely on smart detection logic that prioritizes user overrides while maintaining safety through validation. This eliminates environment misconfiguration bugs and streamlines deployment workflows across local development, automated testing, and production systems.


.. _install:

Install
------------------------------------------------------------------------------

``which_env`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install which-env

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade which-env


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "which-env",
    "maintainer": "Sanhe Hu",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "husanhe@gmail.com",
    "keywords": null,
    "author": "Sanhe Hu",
    "author_email": "husanhe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/67/c000c71a4fe6025da90e8c119459f701114a46ea4f6872de25dfb4566648/which_env-0.2.1.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://readthedocs.org/projects/which-env/badge/?version=latest\n    :target: https://which-env.readthedocs.io/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://github.com/MacHu-GWU/which_env-project/actions/workflows/main.yml/badge.svg\n    :target: https://github.com/MacHu-GWU/which_env-project/actions?query=workflow:CI\n\n.. image:: https://codecov.io/gh/MacHu-GWU/which_env-project/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/MacHu-GWU/which_env-project\n\n.. image:: https://img.shields.io/pypi/v/which-env.svg\n    :target: https://pypi.python.org/pypi/which-env\n\n.. image:: https://img.shields.io/pypi/l/which-env.svg\n    :target: https://pypi.python.org/pypi/which-env\n\n.. image:: https://img.shields.io/pypi/pyversions/which-env.svg\n    :target: https://pypi.python.org/pypi/which-env\n\n.. image:: https://img.shields.io/badge/\u270d\ufe0f_Release_History!--None.svg?style=social&logo=github\n    :target: https://github.com/MacHu-GWU/which_env-project/blob/main/release-history.rst\n\n.. image:: https://img.shields.io/badge/\u2b50_Star_me_on_GitHub!--None.svg?style=social&logo=github\n    :target: https://github.com/MacHu-GWU/which_env-project\n\n------\n\n.. image:: https://img.shields.io/badge/Link-API-blue.svg\n    :target: https://which-env.readthedocs.io/en/latest/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Install-blue.svg\n    :target: `install`_\n\n.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n    :target: https://github.com/MacHu-GWU/which_env-project\n\n.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg\n    :target: https://github.com/MacHu-GWU/which_env-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg\n    :target: https://github.com/MacHu-GWU/which_env-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Download-blue.svg\n    :target: https://pypi.org/pypi/which-env#files\n\n\nWelcome to ``which_env`` Documentation\n==============================================================================\n.. image:: https://which-env.readthedocs.io/en/latest/_static/which_env-logo.png\n    :target: https://which-env.readthedocs.io/en/latest/\n\nManaging multiple deployment environments (dev, staging, production) is essential for safe software delivery, but manually specifying environments leads to configuration errors and inconsistent deployments. ``which_env`` solves this by providing intelligent environment detection that adapts to your runtime context - defaulting to development locally while automatically detecting the correct environment in CI/CD pipelines and production deployments.\n\nThe library uses a simple inheritance pattern where you define your project's environments once, then rely on smart detection logic that prioritizes user overrides while maintaining safety through validation. This eliminates environment misconfiguration bugs and streamlines deployment workflows across local development, automated testing, and production systems.\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n``which_env`` is released on PyPI, so all you need is to:\n\n.. code-block:: console\n\n    $ pip install which-env\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n    $ pip install --upgrade which-env\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python library for intelligent multi-environment deployment strategy management with automatic runtime-based environment detection.",
    "version": "0.2.1",
    "project_urls": {
        "Changelog": "https://github.com/MacHu-GWU/which_env-project/blob/main/release-history.rst",
        "Documentation": "https://which-env.readthedocs.io/en/latest/",
        "Download": "https://pypi.org/pypi/which-env#files",
        "Homepage": "https://github.com/MacHu-GWU/which_env-project",
        "Issues": "https://github.com/MacHu-GWU/which_env-project/issues",
        "Repository": "https://github.com/MacHu-GWU/which_env-project"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "33289b66f17442d080b0a26775eed0183fa8a3a77789e49c77f9c4dc8c93d131",
                "md5": "855a3562098ee87e4ca85a8b908193fc",
                "sha256": "c92f001192e8a42b046eadcc3643f2a64e1c1d5b296385755492720e6d63bfe9"
            },
            "downloads": -1,
            "filename": "which_env-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "855a3562098ee87e4ca85a8b908193fc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 12131,
            "upload_time": "2025-09-06T15:39:31",
            "upload_time_iso_8601": "2025-09-06T15:39:31.446855Z",
            "url": "https://files.pythonhosted.org/packages/33/28/9b66f17442d080b0a26775eed0183fa8a3a77789e49c77f9c4dc8c93d131/which_env-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a867c000c71a4fe6025da90e8c119459f701114a46ea4f6872de25dfb4566648",
                "md5": "8281441458a5b70b3032a87320e40217",
                "sha256": "45a6d3cf5200752eb97e31177d04354d4bade6cade5425c3d72db9643b48f1be"
            },
            "downloads": -1,
            "filename": "which_env-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8281441458a5b70b3032a87320e40217",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 11472,
            "upload_time": "2025-09-06T15:39:33",
            "upload_time_iso_8601": "2025-09-06T15:39:33.033117Z",
            "url": "https://files.pythonhosted.org/packages/a8/67/c000c71a4fe6025da90e8c119459f701114a46ea4f6872de25dfb4566648/which_env-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-06 15:39:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MacHu-GWU",
    "github_project": "which_env-project",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "enum-mate",
            "specs": [
                [
                    "==",
                    "0.1.1"
                ]
            ]
        },
        {
            "name": "which-runtime",
            "specs": [
                [
                    "==",
                    "0.1.1"
                ]
            ]
        }
    ],
    "lcname": "which-env"
}
        
Elapsed time: 0.87707s