Skip to content

Add mojo-dotenv v0.2.2 - .env file loader for Mojo#197

Merged
bgreni merged 6 commits intomodular:mainfrom
Mjboothaus:add-mojo-dotenv-v0.2.2
Feb 3, 2026
Merged

Add mojo-dotenv v0.2.2 - .env file loader for Mojo#197
bgreni merged 6 commits intomodular:mainfrom
Mjboothaus:add-mojo-dotenv-v0.2.2

Conversation

@Mjboothaus
Copy link
Contributor

Adds mojo-dotenv v0.2.2 - Production-ready .env file parser and loader for Mojo.

Changes from previous PR #192:

  • ✅ Added package image (recipes/mojo-dotenv/image.png) for builds.modular.com display per reviewer guidelines
  • ✅ Enabled CodeQL scanning and added badge to repository README
  • ✅ Updated license to Apache-2.0
  • ✅ Bumped to v0.2.2 to mark this enhanced release
  • ✅ Renamed test file to test_package.mojo per convention

Package 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
  • 49 comprehensive tests using Mojo's TestSuite framework
  • Zero Python dependencies

Use case: Following 12-factor app methodology for configuration management in Mojo applications.

Repository: https://github.com/DataBooth/mojo-dotenv
CodeQL: CodeQL

Supersedes #192

Mjboothaus and others added 4 commits January 27, 2026 17:17
- Add package image for builds.modular.com display
- Update to v0.2.2 with CodeQL scanning enabled
- Update license to Apache-2.0
- Rename test.mojo to test_package.mojo per convention
- Add mojo_version to context
- Change from 'max >=25.1.0' to 'mojo-compiler =0.25.7'
- Add build section with mojo-compiler
- Use pin_compatible() for runtime dependency

Co-Authored-By: Warp <agent@warp.dev>
Co-Authored-By: Warp <agent@warp.dev>
@Mjboothaus
Copy link
Contributor Author

Mjboothaus commented Feb 2, 2026

Update:

  • migrated mojo-dotenv to Mojo 0.26.1.
  • In the mojo-dotenv repo, MAX is now pinned to '>=26.1.0,<27', parser string handling was updated to use codepoint_slices()/List[String] instead of direct String indexing, and the full test suite passes under 0.26.1.
  • The local mojo-dotenv recipe.yaml now uses context.mojo_version = '=0.26.1' and the same pattern has been applied to this modular-community recipe (recipes/mojo-dotenv/recipe.yaml).
  • Local builds indicate mojo-dotenv is compatible with Mojo 0.26.1; any remaining build-all issues are due to other recipes / MAX channel availability.

@bgreni bgreni merged commit e259eab into modular:main Feb 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants