Skip to main content

localenv

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

# 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:

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

or from conda

$ conda install -c fenke localenv

or from pypi

$ pip install localenv

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi 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

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

Then import it similar to the following code snippet

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.

getenv('USR_TOKEN')

Release files for localenv 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for localenv 0.0.2
File Size Uploaded
localenv-0.0.2.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for localenv 0.0.2
File Interpreter ABI Platform
localenv-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / localenv-0.0.2.tar.gz

Download URL localenv-0.0.2.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
38e4f013af9a42e3c1be7e0e4c902781230712782b46d0b78e7a4841b59069ee
BLAKE2b-256 checksum
How to use checksums
c5b502f99697823454e183e4427ee5b50d3dbfb63fc77ceddbdf97cabba02449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.10

Release files / localenv-0.0.2-py3-none-any.whl

Download URL localenv-0.0.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18f3f91d798bd749182da2a92abd0048ca316edad82ec50894e7420ab336574c
BLAKE2b-256 checksum
How to use checksums
96bf1ebcbbf6c531cc087275de6314370a42b0310fc7084d01fe1bf2f1df7082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page