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
- Print a variable's value:
mike API_KEY
- Add or update a variable:
mike NEW_KEY=value
mike "KEY_WITH_SPACES=value with spaces"
- Delete a variable:
mike delete VARIABLE_NAME
- View all variables:
mike
Features
- Automatically loads variables from
.envfile - Type hints support with auto-generated
.pyistub file - Command-line interface for managing variables
- Preserves comments and formatting in
.envfile - 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 codemike/__init__.pyi: Auto-generated type stubs
Dependencies
- python-dotenv
Notes
- The package creates and uses a
.envfile 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
Release history Release notifications | RSS feed
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.9.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mydotenv-0.1.9.tar.gz.
File metadata
- Download URL: mydotenv-0.1.9.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1e47fe7e5f01b5f9055cf1409db39976b4f958ec6c298d962b6acf2bce257fa
|
|
| MD5 |
52d1a7cd98826f0bb36e0bead3317942
|
|
| BLAKE2b-256 |
def0a3097de549e8e745c55942082db6d7aafbd63435447d565056b36b160aaf
|
File details
Details for the file mydotenv-0.1.9-py3-none-any.whl.
File metadata
- Download URL: mydotenv-0.1.9-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e274b6db6af4502a5f3895a3757daeb82d28da3663d773556a642f96ca8c74d
|
|
| MD5 |
6166fa5607f7bf6d3c3a98e0a052a9d1
|
|
| BLAKE2b-256 |
02f72213a856d63a86405f1b5a0400a694f0d4ee2574160d5dc49fff2288dbbf
|