python-dotenvx 0.2.5__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dotenvx/__version__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  __title__ = "python-dotenvx"
2
2
  __description__ = "[dotenvx.com] a better dotenv–from the creator of `dotenv`"
3
3
  __url__ = "https://github.com/dotenvx/python-dotenvx"
4
- __version__ = "0.2.5"
4
+ __version__ = "0.3.0"
5
5
  __author__ = "dotenv"
6
6
  __author_email__ = "mot@dotenvx.com"
7
7
  __license__ = "BSD-3-Clause"
dotenvx/main.py CHANGED
@@ -8,8 +8,14 @@ from dotenvx import __file__ as package_path
8
8
 
9
9
  ERROR_MISSING_BINARY = "[MISSING_BINARY] missing dotenvx binary\n[MISSING_BINARY] https://github.com/dotenvx/dotenvx/issues/576"
10
10
 
11
- def load_dotenvx():
12
- output = get()
11
+ def load_dotenvx(
12
+ dotenv_path=None,
13
+ override=False
14
+ ):
15
+ output = dotenvx_get(
16
+ dotenv_path=dotenv_path,
17
+ override=override
18
+ )
13
19
 
14
20
  try:
15
21
  parsed = json.loads(output)
@@ -19,10 +25,20 @@ def load_dotenvx():
19
25
  except Exception as e:
20
26
  raise RuntimeError(f"Failed to parse dotenvx output: {e}")
21
27
 
22
- def get():
28
+ def dotenvx_get(
29
+ dotenv_path=None,
30
+ override=False
31
+ ):
23
32
  binpath = binary()
33
+ cmd = [binpath, "get", "-pp"]
34
+
35
+ if dotenv_path:
36
+ cmd += ["-f", dotenv_path]
37
+ if override:
38
+ cmd.append("--overload")
39
+
24
40
  output = subprocess.run(
25
- [binpath, "get", "-pp"],
41
+ cmd,
26
42
  capture_output=True,
27
43
  text=True,
28
44
  check=True
@@ -61,7 +77,7 @@ def postinstall():
61
77
  bin_dir = os.path.join(os.path.dirname(__file__), "bin")
62
78
  os.makedirs(bin_dir, exist_ok=True)
63
79
 
64
- url = f"https://dotenvx.sh?directory={bin_dir}"
80
+ url = f"https://dotenvx.sh?directory={bin_dir}&force=true"
65
81
  if args.os:
66
82
  url += f"&os={args.os}"
67
83
  if args.arch:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-dotenvx
3
- Version: 0.2.5
3
+ Version: 0.3.0
4
4
  Summary: [dotenvx.com] a better dotenv–from the creator of `dotenv`
5
5
  Home-page: https://github.com/dotenvx/python-dotenvx
6
6
  Author: dotenv
@@ -76,7 +76,19 @@ print(os.getenv("S3_BUCKET"))
76
76
 
77
77
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
78
78
 
79
- ## [Unreleased](https://github.com/dotenvx/python-dotenvx/compare/v0.2.5...main)
79
+ ## [Unreleased](https://github.com/dotenvx/python-dotenvx/compare/v0.3.0...main)
80
+
81
+ ## [0.3.0](https://github.com/dotenvx/dotenvx/compare/v0.2.6...v0.3.0)
82
+
83
+ ### Added
84
+
85
+ * Add `dotenv_path` and `override` arguments ([#4](https://github.com/dotenvx/python-dotenvx/pull/4))
86
+
87
+ ## [0.2.6](https://github.com/dotenvx/dotenvx/compare/v0.2.5...v0.2.6)
88
+
89
+ ### Changed
90
+
91
+ * Add force to the binary install
80
92
 
81
93
  ## [0.2.5](https://github.com/dotenvx/dotenvx/compare/v0.2.4...v0.2.5)
82
94
 
@@ -0,0 +1,10 @@
1
+ dotenvx/__init__.py,sha256=rfD8JBefABV8cPWOI8_po_RG6OMpFdrQTKRZSM5QipI,31
2
+ dotenvx/__version__.py,sha256=7XtBSbtp7lJIp1kKIETUHmmrrbD9GepC5cRGnZPeFdM,274
3
+ dotenvx/main.py,sha256=FjvFHDK7K27G8AgNT5tQcjEAdXLk6P9BAluJJF0nFl4,2542
4
+ dotenvx/bin/dotenvx,sha256=s7IfiwTOzpRT1vRD1UXsI-DXGv9Lp8ujCGyiwVExP8c,90
5
+ python_dotenvx-0.3.0.dist-info/licenses/LICENSE,sha256=Lt6wCRSMNsJJcSVkhx2Cl9kglLiOQXIo5PPOfbWe6e0,1498
6
+ python_dotenvx-0.3.0.dist-info/METADATA,sha256=MqsAonxhUNr3fMCPml7_e1saO_W9NnVeNi4yQ16lXnY,3260
7
+ python_dotenvx-0.3.0.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
8
+ python_dotenvx-0.3.0.dist-info/entry_points.txt,sha256=Nub8f_4lO2T3-qRk5wJF-ii_fI9PQ7oPTjSI9e1OaXk,65
9
+ python_dotenvx-0.3.0.dist-info/top_level.txt,sha256=nl1TEgPiBhIp7rqusyvY6zlWLlcDroqH5GQxH-ImMkk,8
10
+ python_dotenvx-0.3.0.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- dotenvx/__init__.py,sha256=rfD8JBefABV8cPWOI8_po_RG6OMpFdrQTKRZSM5QipI,31
2
- dotenvx/__version__.py,sha256=LmZrMiECOTpessWyZ13_ExPOPMjPFoWaA1njD5lAy1g,274
3
- dotenvx/main.py,sha256=irs9VE4HZZWiBlZR4b_lQpr3ECn6nKFQwshYj_Lg3JQ,2230
4
- dotenvx/bin/dotenvx,sha256=s7IfiwTOzpRT1vRD1UXsI-DXGv9Lp8ujCGyiwVExP8c,90
5
- python_dotenvx-0.2.5.dist-info/licenses/LICENSE,sha256=Lt6wCRSMNsJJcSVkhx2Cl9kglLiOQXIo5PPOfbWe6e0,1498
6
- python_dotenvx-0.2.5.dist-info/METADATA,sha256=QwC72olQVXUN7rtVgMdlR8kvs8fu0ZuzCG8iDjP-oJQ,2954
7
- python_dotenvx-0.2.5.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
8
- python_dotenvx-0.2.5.dist-info/entry_points.txt,sha256=Nub8f_4lO2T3-qRk5wJF-ii_fI9PQ7oPTjSI9e1OaXk,65
9
- python_dotenvx-0.2.5.dist-info/top_level.txt,sha256=nl1TEgPiBhIp7rqusyvY6zlWLlcDroqH5GQxH-ImMkk,8
10
- python_dotenvx-0.2.5.dist-info/RECORD,,