Skip to main content

A simple package to manage environment variables with command-line interface

Project description

Mike Package

A simple Python package to manage environment variables in your .env file with command-line interface.

Installation

From PyPI

pip install mike

From Source

git clone https://github.com/yourusername/mike-package.git
cd mike-package
pip install -e .

Usage

In Python Scripts

# Import all variables
from mike import *

# Use variables directly
print(API_KEY)
print(DATABASE_URL)

# Or import specific variables
from mike import API_KEY, DATABASE_URL

Command Line Interface

  1. Print a variable's value:
mike API_KEY
  1. Add or update a variable:
mike NEW_KEY=value
mike "KEY_WITH_SPACES=value with spaces"
  1. Delete a variable:
mike delete VARIABLE_NAME
  1. View all variables:
mike

Features

  • Automatically loads variables from .env file
  • Type hints support with auto-generated .pyi stub file
  • Command-line interface for managing variables
  • Preserves comments and formatting in .env file
  • Handles values with spaces and special characters
  • Works from any directory

File Structure

  • .env: Your environment variables file (created in your home directory)
  • mike/__init__.py: Main package code
  • mike/__init__.pyi: Auto-generated type stubs

Dependencies

  • python-dotenv

Notes

  • The package creates and uses a .env file in your home directory
  • Variables are automatically reloaded when modified through the CLI
  • Type stubs are automatically updated when variables change
  • Perfect for managing API keys, database URLs, and other configuration variables

License

MIT License - feel free to use this package in your projects!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mydotenv-0.1.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mydotenv-0.1.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file mydotenv-0.1.4.tar.gz.

File metadata

  • Download URL: mydotenv-0.1.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mydotenv-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b2b007b0a803d65ea525a26e1fd9f56f918a38a6860d744f8aab6804426b670c
MD5 5decf6a246ede04d9f8ce13462837cfd
BLAKE2b-256 ca8fe48922e326c9b1d41fa08dfb1519b46ba3947d602dbfa439a7ed9459fc27

See more details on using hashes here.

File details

Details for the file mydotenv-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: mydotenv-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mydotenv-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 92dcdfe986562852e1d956a1271075c2fa8a8d3ca83bd6a3e4e1cfd69d5c16a2
MD5 e82388645bf03f0b785fc5f32de3a573
BLAKE2b-256 6ad72f5c6e2875db77093c265e9d7b17b953f9210b19a2190154812f5e2cd004

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page