localenv


Namelocalenv JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/fenke/localenv
SummaryProvide flexible environment variables
upload_time2025-02-15 20:59:10
maintainerNone
docs_urlNone
authorFenke Meijer
requires_python>=3.7
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # localenv


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This file will become your README and also the index of your
documentation.

## Developer Guide

If you are new to using `nbdev` here are some useful pointers to get you
started.

### Install localenv in Development mode

``` sh
# make sure localenv package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to localenv
$ nbdev_prepare
```

## Usage

### Installation

Install latest from the GitHub
[repository](https://github.com/fenke/localenv):

``` sh
$ pip install git+https://github.com/fenke/localenv.git
```

or from [conda](https://anaconda.org/fenke/localenv)

``` sh
$ conda install -c fenke localenv
```

or from [pypi](https://pypi.org/project/localenv/)

``` sh
$ pip install localenv
```

### Documentation

Documentation can be found hosted on this GitHub
[repository](https://github.com/fenke/localenv)’s
[pages](https://fenke.github.io/localenv/). Additionally you can find
package manager specific guidelines on
[conda](https://anaconda.org/fenke/localenv) and
[pypi](https://pypi.org/project/localenv/) respectively.

## How to use

Create a `.env.json` file somewhere on the parent path(s) of you current
working directory, populate it with environment variables organized in
‘sections’ like

``` json
{
    "development": {
        "USR_TOKEN": "super-secret-token",
    },
    "production": {
        "USR_TOKEN": "another-super-secret-token",
    }
}
```

Then import it similar to the following code snippet

``` python
from localenv.envs import production as getenv
```

This loads the set of variables from under the sectionkey ‘production’
in the `.env.json` file and makes them accessible via the `getenv`
function.

``` python
getenv('USR_TOKEN')
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fenke/localenv",
    "name": "localenv",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "nbdev jupyter notebook python",
    "author": "Fenke Meijer",
    "author_email": "fenke@live.com",
    "download_url": "https://files.pythonhosted.org/packages/d2/9f/1fe1f3016e791850aa5264eaf70cf62dc836d6225b3184f13aa939635b64/localenv-0.0.1.tar.gz",
    "platform": null,
    "description": "# localenv\n\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nThis file will become your README and also the index of your\ndocumentation.\n\n## Developer Guide\n\nIf you are new to using `nbdev` here are some useful pointers to get you\nstarted.\n\n### Install localenv in Development mode\n\n``` sh\n# make sure localenv package is installed in development mode\n$ pip install -e .\n\n# make changes under nbs/ directory\n# ...\n\n# compile to have changes apply to localenv\n$ nbdev_prepare\n```\n\n## Usage\n\n### Installation\n\nInstall latest from the GitHub\n[repository](https://github.com/fenke/localenv):\n\n``` sh\n$ pip install git+https://github.com/fenke/localenv.git\n```\n\nor from [conda](https://anaconda.org/fenke/localenv)\n\n``` sh\n$ conda install -c fenke localenv\n```\n\nor from [pypi](https://pypi.org/project/localenv/)\n\n``` sh\n$ pip install localenv\n```\n\n### Documentation\n\nDocumentation can be found hosted on this GitHub\n[repository](https://github.com/fenke/localenv)\u2019s\n[pages](https://fenke.github.io/localenv/). Additionally you can find\npackage manager specific guidelines on\n[conda](https://anaconda.org/fenke/localenv) and\n[pypi](https://pypi.org/project/localenv/) respectively.\n\n## How to use\n\nCreate a `.env.json` file somewhere on the parent path(s) of you current\nworking directory, populate it with environment variables organized in\n\u2018sections\u2019 like\n\n``` json\n{\n    \"development\": {\n        \"USR_TOKEN\": \"super-secret-token\",\n    },\n    \"production\": {\n        \"USR_TOKEN\": \"another-super-secret-token\",\n    }\n}\n```\n\nThen import it similar to the following code snippet\n\n``` python\nfrom localenv.envs import production as getenv\n```\n\nThis loads the set of variables from under the sectionkey \u2018production\u2019\nin the `.env.json` file and makes them accessible via the `getenv`\nfunction.\n\n``` python\ngetenv('USR_TOKEN')\n```\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Provide flexible environment variables",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/fenke/localenv"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "261b46a80f5078958da51d169820209e67679d91e0ebd065e9fffe5cb726eadc",
                "md5": "c0089771fd5f2481eaa52a5c2be16cf8",
                "sha256": "2d2117b3617850215c97b6a540049fdb51f0c2b0397c4fe4f4865c80b5add073"
            },
            "downloads": -1,
            "filename": "localenv-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0089771fd5f2481eaa52a5c2be16cf8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7953,
            "upload_time": "2025-02-15T20:59:08",
            "upload_time_iso_8601": "2025-02-15T20:59:08.734543Z",
            "url": "https://files.pythonhosted.org/packages/26/1b/46a80f5078958da51d169820209e67679d91e0ebd065e9fffe5cb726eadc/localenv-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d29f1fe1f3016e791850aa5264eaf70cf62dc836d6225b3184f13aa939635b64",
                "md5": "47c6737076b85548dbc673ab086e071f",
                "sha256": "94f68eb650ef3bd5c753f9dec3598c3d485011ae5477b074a13593dc9dc25a8d"
            },
            "downloads": -1,
            "filename": "localenv-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "47c6737076b85548dbc673ab086e071f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8766,
            "upload_time": "2025-02-15T20:59:10",
            "upload_time_iso_8601": "2025-02-15T20:59:10.080142Z",
            "url": "https://files.pythonhosted.org/packages/d2/9f/1fe1f3016e791850aa5264eaf70cf62dc836d6225b3184f13aa939635b64/localenv-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-15 20:59:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fenke",
    "github_project": "localenv",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "localenv"
}
        
Elapsed time: 1.61027s