You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

envkit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envkit

A lightweight package for parsing environment variables.

0.3.1
pipPyPI
Maintainers
1

EnvKit

A lightweight package for parsing environment variables.

Does not work with mypy yet, but it does work with pyright/basedpyright.

Installation

pip install envkit

Usage

from envkit import Fields

# Required string with minimum length
api_key = Fields.str("API_KEY", min_length=32)

# Optional integer with default and range
port = Fields.int("PORT", default=8080, min_value=1, max_value=65535)

# Boolean with default
debug = Fields.bool("DEBUG", default=False)

# Enum parsing
log_level = Fields.enum("LOG_LEVEL", enum=LogLevel, default=LogLevel.INFO)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts