theskumar / theskumar/python-dotenv
Consider using bashlex
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 8.9k
- フォーク
- 581
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi.
I've been using .env files for a while, namely to setup variable and load python virtual environments, also with stuff like autoenv.
This means that my .env files have bash code, like if statements, sourcing other scripts, commands, functions.
dotenvs limited reader code just uses a couple regexs that can't handle much more than export statements. And this is something some people might not be expecting.
Suggestion:
- use bashlex to parse the
.envfiles. https://github.com/idank/bashlex - gather variables defined only at the top level
- implement variable substitution (quite easy to implement) e.g.
${VARNAME:-fallback} - recursively source other sourced scripts, e.g.
.envincludes the linesource .envrc.
This would be a reimplementation of the module, so perhaps something for a major release ?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
The issue proposes replacing dotenv's limited reader with bashlex. Start by locating the existing .env reader and reviewing bashlex's parsing model; done means top-level variables, ${VARNAME:-fallback} substitution, and recursive source handling work for files such as .env sourcing .envrc, with the scope suitable for a major release.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- bash, python
- 領域
- devops, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100