pywrit 0.2.2__tar.gz → 0.2.3__tar.gz
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.
- {pywrit-0.2.2/src/pywrit.egg-info → pywrit-0.2.3}/PKG-INFO +1 -1
- {pywrit-0.2.2 → pywrit-0.2.3}/pyproject.toml +1 -1
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit/__init__.py +1 -1
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit/cli.py +0 -15
- {pywrit-0.2.2 → pywrit-0.2.3/src/pywrit.egg-info}/PKG-INFO +1 -1
- {pywrit-0.2.2 → pywrit-0.2.3}/LICENSE +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/README.md +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/setup.cfg +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit/client.py +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit/errors.py +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit.egg-info/SOURCES.txt +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit.egg-info/dependency_links.txt +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit.egg-info/entry_points.txt +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit.egg-info/requires.txt +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/src/pywrit.egg-info/top_level.txt +0 -0
- {pywrit-0.2.2 → pywrit-0.2.3}/tests/test_client.py +0 -0
|
@@ -732,21 +732,6 @@ MONEY_VERB_PATTERNS = (
|
|
|
732
732
|
)
|
|
733
733
|
|
|
734
734
|
|
|
735
|
-
def request(method, path, payload=None, key=None, token=None):
|
|
736
|
-
headers = {"content-type": "application/json"}
|
|
737
|
-
if key:
|
|
738
|
-
headers["authorization"] = "Bearer " + key
|
|
739
|
-
elif token:
|
|
740
|
-
headers["authorization"] = token
|
|
741
|
-
data = None if payload is None else json.dumps(payload).encode()
|
|
742
|
-
req = urllib.request.Request(BASE + path, data=data, headers=headers, method=method)
|
|
743
|
-
try:
|
|
744
|
-
with urllib.request.urlopen(req, timeout=20) as resp:
|
|
745
|
-
return 0, resp.read().decode()
|
|
746
|
-
except urllib.error.HTTPError as exc:
|
|
747
|
-
return exc.code, exc.read().decode()
|
|
748
|
-
|
|
749
|
-
|
|
750
735
|
# ---------------------------------------------------------------------------
|
|
751
736
|
# Agent Action Report
|
|
752
737
|
# ---------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|