Skip to content

Conversation

@Mjboothaus
Copy link

mojo-dotenv v0.2.0

A production-ready .env file parser and loader for Mojo with near-100% python-dotenv compatibility.

Features:

  • Parse .env files to Dict or load into environment
  • Variable expansion (${VAR} and $VAR syntax)
  • Multiline values and escape sequences
  • Auto-discovery with find_dotenv()
  • 98%+ compatible with python-dotenv
  • 42 comprehensive tests using Mojo's TestSuite framework

Repository: https://github.com/DataBooth/mojo-dotenv
License: MIT License

This fills a gap in the Mojo ecosystem for configuration management following 12-factor app methodology.

Testing:

  • Recipe created with proper rattler-build format
  • Git tag v0.2.0 exists
  • Tests included
  • Follows modular-community guidelines

- Production-ready .env file parser and loader for Mojo
- 98%+ compatible with python-dotenv
- Variable expansion, multiline values, escape sequences
- Auto-discovery with find_dotenv()
- 42 comprehensive tests with TestSuite framework
- MIT License

Version: 0.2.0
Repository: https://github.com/DataBooth/mojo-dotenv
Mjboothaus added a commit to DataBooth/mojo-dotenv that referenced this pull request Jan 6, 2026
- Mark modular-community submission as complete
- PR #192: modular/modular-community#192
- Status: Awaiting review/merge
- Add note about Apache 2.0 license under consideration

Co-Authored-By: Warp <[email protected]>
Update recipe to use v0.2.1 which includes important improvements:

- Improved missing file handling (returns empty dict with WARNING)
- Better error visibility and documentation
- 7 new tests for missing file scenarios (49 total)
- Documented Mojo vs Python getenv() differences
- Updated README examples with proper error handling

All changes are backward compatible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant