hush-hush 1.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.
- hush_hush-1.2.3/PKG-INFO +74 -0
- hush_hush-1.2.3/README.md +57 -0
- hush_hush-1.2.3/pyproject.toml +81 -0
- hush_hush-1.2.3/pyproject.toml.orig +72 -0
- hush_hush-1.2.3/src/hush_hush/__init__.py +25 -0
- hush_hush-1.2.3/src/hush_hush/_generated/__init__.py +10 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/__init__.py +3 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/audit_log/__init__.py +3 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/audit_log/query_audit_log.py +239 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/health/__init__.py +3 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/health/health.py +142 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/objects/__init__.py +3 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/objects/create_object.py +204 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/objects/delete_object.py +196 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/objects/get_object.py +205 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/objects/get_object_used_by.py +179 -0
- hush_hush-1.2.3/src/hush_hush/_generated/api/objects/update_object.py +220 -0
- hush_hush-1.2.3/src/hush_hush/_generated/client.py +274 -0
- hush_hush-1.2.3/src/hush_hush/_generated/errors.py +18 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/__init__.py +23 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/audit_log_entry.py +105 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/audit_log_entry_action.py +13 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/create_object_request.py +85 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/error.py +64 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/health.py +65 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/object_metadata.py +77 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/update_object_request.py +63 -0
- hush_hush-1.2.3/src/hush_hush/_generated/models/used_by.py +64 -0
- hush_hush-1.2.3/src/hush_hush/_generated/types.py +56 -0
- hush_hush-1.2.3/src/hush_hush/client.py +380 -0
- hush_hush-1.2.3/src/hush_hush/errors.py +41 -0
- hush_hush-1.2.3/src/hush_hush/retry.py +121 -0
hush_hush-1.2.3/PKG-INFO
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hush-hush
|
|
3
|
+
Version: 1.2.3
|
|
4
|
+
Summary: Official Python SDK for hush-hush, generated from its OpenAPI spec
|
|
5
|
+
Author: alrayyes
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Requires-Dist: httpx==0.28.1
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Project-URL: Homepage, https://github.com/alrayyes/hush-hush-python
|
|
15
|
+
Project-URL: Repository, https://github.com/alrayyes/hush-hush-python
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# hush-hush-python
|
|
19
|
+
|
|
20
|
+
[](https://github.com/alrayyes/hush-hush-python/actions/workflows/ci.yml)
|
|
21
|
+
[](https://codecov.io/gh/alrayyes/hush-hush-python)
|
|
22
|
+
[](https://pypi.org/project/hush-hush/)
|
|
23
|
+
[](https://github.com/alrayyes/hush-hush-python/releases)
|
|
24
|
+
[](LICENSE)
|
|
25
|
+
|
|
26
|
+
The official Python SDK for [hush-hush](https://github.com/alrayyes/hush-hush),
|
|
27
|
+
generated from its OpenAPI spec and kept in sync with it automatically.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
pip install hush-hush
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Requires Python 3.11 or newer.
|
|
36
|
+
|
|
37
|
+
## Quickstart
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from hush_hush import Client
|
|
41
|
+
|
|
42
|
+
client = Client("https://hush-hush.example.com", api_key="your-api-key") # or set HUSH_HUSH_API_KEY
|
|
43
|
+
|
|
44
|
+
# Create is a write operation — it needs the credential above.
|
|
45
|
+
client.create_object("my-first-secret", b"already-sealed-ciphertext")
|
|
46
|
+
|
|
47
|
+
# Get needs no credential — hush-hush's confidentiality boundary is
|
|
48
|
+
# "who holds a matching private key," not who's calling this endpoint.
|
|
49
|
+
value = client.get_object("my-first-secret")
|
|
50
|
+
print(f"got {len(value)} bytes of sealed ciphertext")
|
|
51
|
+
|
|
52
|
+
# The audit log records every read and write; querying it needs no
|
|
53
|
+
# credential either, and returns the full matching result set (there's
|
|
54
|
+
# no pagination on this endpoint).
|
|
55
|
+
for entry in client.query_audit_log():
|
|
56
|
+
print(entry.action, entry.object_id, entry.timestamp)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
An `AsyncClient` with the same methods (`await client.get_object(...)`) is
|
|
60
|
+
available for async code. The API key is only required for write operations
|
|
61
|
+
(create/update/delete); reads (get, used-by, audit-log query) work without
|
|
62
|
+
one. `caller`, accepted by most methods, is optional. See the
|
|
63
|
+
[full API reference](https://alrayyes.github.io/hush-hush-python/) for
|
|
64
|
+
everything else.
|
|
65
|
+
|
|
66
|
+
## Versioning
|
|
67
|
+
|
|
68
|
+
This SDK's version tracks hush-hush's OpenAPI spec, not this repo's own
|
|
69
|
+
commit history — see [CONTRIBUTING.md](CONTRIBUTING.md) for how a spec
|
|
70
|
+
change becomes a release.
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# hush-hush-python
|
|
2
|
+
|
|
3
|
+
[](https://github.com/alrayyes/hush-hush-python/actions/workflows/ci.yml)
|
|
4
|
+
[](https://codecov.io/gh/alrayyes/hush-hush-python)
|
|
5
|
+
[](https://pypi.org/project/hush-hush/)
|
|
6
|
+
[](https://github.com/alrayyes/hush-hush-python/releases)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
The official Python SDK for [hush-hush](https://github.com/alrayyes/hush-hush),
|
|
10
|
+
generated from its OpenAPI spec and kept in sync with it automatically.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pip install hush-hush
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Requires Python 3.11 or newer.
|
|
19
|
+
|
|
20
|
+
## Quickstart
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from hush_hush import Client
|
|
24
|
+
|
|
25
|
+
client = Client("https://hush-hush.example.com", api_key="your-api-key") # or set HUSH_HUSH_API_KEY
|
|
26
|
+
|
|
27
|
+
# Create is a write operation — it needs the credential above.
|
|
28
|
+
client.create_object("my-first-secret", b"already-sealed-ciphertext")
|
|
29
|
+
|
|
30
|
+
# Get needs no credential — hush-hush's confidentiality boundary is
|
|
31
|
+
# "who holds a matching private key," not who's calling this endpoint.
|
|
32
|
+
value = client.get_object("my-first-secret")
|
|
33
|
+
print(f"got {len(value)} bytes of sealed ciphertext")
|
|
34
|
+
|
|
35
|
+
# The audit log records every read and write; querying it needs no
|
|
36
|
+
# credential either, and returns the full matching result set (there's
|
|
37
|
+
# no pagination on this endpoint).
|
|
38
|
+
for entry in client.query_audit_log():
|
|
39
|
+
print(entry.action, entry.object_id, entry.timestamp)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
An `AsyncClient` with the same methods (`await client.get_object(...)`) is
|
|
43
|
+
available for async code. The API key is only required for write operations
|
|
44
|
+
(create/update/delete); reads (get, used-by, audit-log query) work without
|
|
45
|
+
one. `caller`, accepted by most methods, is optional. See the
|
|
46
|
+
[full API reference](https://alrayyes.github.io/hush-hush-python/) for
|
|
47
|
+
everything else.
|
|
48
|
+
|
|
49
|
+
## Versioning
|
|
50
|
+
|
|
51
|
+
This SDK's version tracks hush-hush's OpenAPI spec, not this repo's own
|
|
52
|
+
commit history — see [CONTRIBUTING.md](CONTRIBUTING.md) for how a spec
|
|
53
|
+
change becomes a release.
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "uv_build"
|
|
3
|
+
requires = ["uv-build>=0.12.5,<0.13"]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "hush-hush"
|
|
7
|
+
version = "1.2.3"
|
|
8
|
+
description = "Official Python SDK for hush-hush, generated from its OpenAPI spec"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Programming Language :: Python :: 3.14",
|
|
18
|
+
]
|
|
19
|
+
dependencies = ["httpx==0.28.1"]
|
|
20
|
+
|
|
21
|
+
[[project.authors]]
|
|
22
|
+
name = "alrayyes"
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/alrayyes/hush-hush-python"
|
|
26
|
+
Repository = "https://github.com/alrayyes/hush-hush-python"
|
|
27
|
+
|
|
28
|
+
[dependency-groups]
|
|
29
|
+
dev = [
|
|
30
|
+
"openapi-python-client==0.29.0",
|
|
31
|
+
"pact-python==3.4.0",
|
|
32
|
+
"pip-audit==2.10.1",
|
|
33
|
+
"pytest==9.1.1",
|
|
34
|
+
"pytest-asyncio==1.4.0",
|
|
35
|
+
"pytest-cov==7.1.0",
|
|
36
|
+
"ruff==0.16.5",
|
|
37
|
+
]
|
|
38
|
+
docs = [
|
|
39
|
+
"mkdocs==1.6.1",
|
|
40
|
+
"mkdocs-material==9.7.7",
|
|
41
|
+
"mkdocstrings[python]==1.0.6",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[tool.ruff]
|
|
45
|
+
target-version = "py311"
|
|
46
|
+
line-length = 100
|
|
47
|
+
extend-exclude = ["src/hush_hush/_generated"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff.format]
|
|
50
|
+
indent-style = "space"
|
|
51
|
+
quote-style = "double"
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint]
|
|
54
|
+
select = [
|
|
55
|
+
"B",
|
|
56
|
+
"C4",
|
|
57
|
+
"E",
|
|
58
|
+
"F",
|
|
59
|
+
"I",
|
|
60
|
+
"N",
|
|
61
|
+
"SIM",
|
|
62
|
+
"UP",
|
|
63
|
+
"W",
|
|
64
|
+
]
|
|
65
|
+
ignore = ["E501"]
|
|
66
|
+
|
|
67
|
+
[tool.ruff.lint.per-file-ignores]
|
|
68
|
+
"tests/conftest.py" = ["N815"]
|
|
69
|
+
|
|
70
|
+
[tool.ruff.lint.isort]
|
|
71
|
+
known-first-party = ["hush_hush"]
|
|
72
|
+
|
|
73
|
+
[tool.pytest.ini_options]
|
|
74
|
+
testpaths = ["tests"]
|
|
75
|
+
addopts = "-m 'not contract and not pact and not e2e'"
|
|
76
|
+
markers = [
|
|
77
|
+
"contract: runs against a local Prism mock, needs HUSH_HUSH_BASE_URL",
|
|
78
|
+
"e2e: runs against a real staging hush-hush, needs HUSH_HUSH_BASE_URL/HUSH_HUSH_API_KEY",
|
|
79
|
+
"pact: records a Pact consumer contract, needs the pact native library",
|
|
80
|
+
]
|
|
81
|
+
asyncio_mode = "auto"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "uv_build"
|
|
3
|
+
requires = [ "uv-build>=0.12.5,<0.13" ]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "hush-hush"
|
|
7
|
+
version = "1.2.3"
|
|
8
|
+
description = "Official Python SDK for hush-hush, generated from its OpenAPI spec"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
authors = [ { name = "alrayyes" } ]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
15
|
+
"Programming Language :: Python :: 3.11",
|
|
16
|
+
"Programming Language :: Python :: 3.12",
|
|
17
|
+
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Programming Language :: Python :: 3.14",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [ "httpx==0.28.1" ]
|
|
21
|
+
urls.Homepage = "https://github.com/alrayyes/hush-hush-python"
|
|
22
|
+
urls.Repository = "https://github.com/alrayyes/hush-hush-python"
|
|
23
|
+
|
|
24
|
+
[dependency-groups]
|
|
25
|
+
dev = [
|
|
26
|
+
"openapi-python-client==0.29.0",
|
|
27
|
+
"pact-python==3.4.0",
|
|
28
|
+
"pip-audit==2.10.1",
|
|
29
|
+
"pytest==9.1.1",
|
|
30
|
+
"pytest-asyncio==1.4.0",
|
|
31
|
+
"pytest-cov==7.1.0",
|
|
32
|
+
"ruff==0.16.5",
|
|
33
|
+
]
|
|
34
|
+
docs = [ "mkdocs==1.6.1", "mkdocs-material==9.7.7", "mkdocstrings[python]==1.0.6" ]
|
|
35
|
+
|
|
36
|
+
[tool.ruff]
|
|
37
|
+
target-version = "py311"
|
|
38
|
+
line-length = 100
|
|
39
|
+
extend-exclude = [ "src/hush_hush/_generated" ]
|
|
40
|
+
format.indent-style = "space"
|
|
41
|
+
format.quote-style = "double"
|
|
42
|
+
lint.select = [
|
|
43
|
+
"B", # flake8-bugbear
|
|
44
|
+
"C4", # flake8-comprehensions
|
|
45
|
+
"E", # pycodestyle errors
|
|
46
|
+
"F", # pyflakes
|
|
47
|
+
"I", # isort
|
|
48
|
+
"N", # pep8-naming
|
|
49
|
+
"SIM", # flake8-simplify
|
|
50
|
+
"UP", # pyupgrade
|
|
51
|
+
"W", # pycodestyle warnings
|
|
52
|
+
]
|
|
53
|
+
lint.ignore = [
|
|
54
|
+
"E501", # line too long (handled by the formatter)
|
|
55
|
+
]
|
|
56
|
+
lint.per-file-ignores = { "tests/conftest.py" = [
|
|
57
|
+
"N815",
|
|
58
|
+
] } # do_GET/do_POST/... names are BaseHTTPRequestHandler's API, not ours to rename
|
|
59
|
+
# Explicit rather than relying on auto-detection: local and CI runs
|
|
60
|
+
# disagreed on whether `hush_hush` counts as first-party, producing a
|
|
61
|
+
# different import order in each and a lint failure only in one of them.
|
|
62
|
+
lint.isort.known-first-party = [ "hush_hush" ]
|
|
63
|
+
|
|
64
|
+
[tool.pytest]
|
|
65
|
+
ini_options.testpaths = [ "tests" ]
|
|
66
|
+
ini_options.addopts = "-m 'not contract and not pact and not e2e'"
|
|
67
|
+
ini_options.markers = [
|
|
68
|
+
"contract: runs against a local Prism mock, needs HUSH_HUSH_BASE_URL",
|
|
69
|
+
"e2e: runs against a real staging hush-hush, needs HUSH_HUSH_BASE_URL/HUSH_HUSH_API_KEY",
|
|
70
|
+
"pact: records a Pact consumer contract, needs the pact native library",
|
|
71
|
+
]
|
|
72
|
+
ini_options.asyncio_mode = "auto"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Official Python SDK for hush-hush."""
|
|
2
|
+
|
|
3
|
+
from ._generated.models.audit_log_entry import AuditLogEntry
|
|
4
|
+
from ._generated.models.audit_log_entry_action import AuditLogEntryAction
|
|
5
|
+
from ._generated.models.health import Health
|
|
6
|
+
from ._generated.models.object_metadata import ObjectMetadata
|
|
7
|
+
from ._generated.models.used_by import UsedBy
|
|
8
|
+
from .client import (
|
|
9
|
+
API_KEY_ENV_VAR,
|
|
10
|
+
AsyncClient,
|
|
11
|
+
Client,
|
|
12
|
+
)
|
|
13
|
+
from .errors import APIError
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"API_KEY_ENV_VAR",
|
|
17
|
+
"APIError",
|
|
18
|
+
"AsyncClient",
|
|
19
|
+
"AuditLogEntry",
|
|
20
|
+
"AuditLogEntryAction",
|
|
21
|
+
"Client",
|
|
22
|
+
"Health",
|
|
23
|
+
"ObjectMetadata",
|
|
24
|
+
"UsedBy",
|
|
25
|
+
]
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Code generated by openapi-python-client from hush-hush/api/openapi.yaml; DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from http import HTTPStatus
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ... import errors
|
|
10
|
+
from ...client import AuthenticatedClient, Client
|
|
11
|
+
from ...models.audit_log_entry import AuditLogEntry
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
object_id: str | Unset = UNSET,
|
|
18
|
+
caller: str | Unset = UNSET,
|
|
19
|
+
from_: datetime.datetime | Unset = UNSET,
|
|
20
|
+
to: datetime.datetime | Unset = UNSET,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
|
|
23
|
+
params: dict[str, Any] = {}
|
|
24
|
+
|
|
25
|
+
params["object_id"] = object_id
|
|
26
|
+
|
|
27
|
+
params["caller"] = caller
|
|
28
|
+
|
|
29
|
+
json_from_: str | Unset = UNSET
|
|
30
|
+
if not isinstance(from_, Unset):
|
|
31
|
+
json_from_ = from_.isoformat()
|
|
32
|
+
params["from"] = json_from_
|
|
33
|
+
|
|
34
|
+
json_to: str | Unset = UNSET
|
|
35
|
+
if not isinstance(to, Unset):
|
|
36
|
+
json_to = to.isoformat()
|
|
37
|
+
params["to"] = json_to
|
|
38
|
+
|
|
39
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
40
|
+
|
|
41
|
+
_kwargs: dict[str, Any] = {
|
|
42
|
+
"method": "get",
|
|
43
|
+
"url": "/audit-log",
|
|
44
|
+
"params": params,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return _kwargs
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _parse_response(
|
|
51
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
52
|
+
) -> list[AuditLogEntry] | None:
|
|
53
|
+
if response.status_code == 200:
|
|
54
|
+
response_200 = []
|
|
55
|
+
_response_200 = response.json()
|
|
56
|
+
for response_200_item_data in _response_200:
|
|
57
|
+
response_200_item = AuditLogEntry.from_dict(response_200_item_data)
|
|
58
|
+
|
|
59
|
+
response_200.append(response_200_item)
|
|
60
|
+
|
|
61
|
+
return response_200
|
|
62
|
+
|
|
63
|
+
if client.raise_on_unexpected_status:
|
|
64
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
65
|
+
else:
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _build_response(
|
|
70
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
71
|
+
) -> Response[list[AuditLogEntry]]:
|
|
72
|
+
return Response(
|
|
73
|
+
status_code=HTTPStatus(response.status_code),
|
|
74
|
+
content=response.content,
|
|
75
|
+
headers=response.headers,
|
|
76
|
+
parsed=_parse_response(client=client, response=response),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync_detailed(
|
|
81
|
+
*,
|
|
82
|
+
client: AuthenticatedClient | Client,
|
|
83
|
+
object_id: str | Unset = UNSET,
|
|
84
|
+
caller: str | Unset = UNSET,
|
|
85
|
+
from_: datetime.datetime | Unset = UNSET,
|
|
86
|
+
to: datetime.datetime | Unset = UNSET,
|
|
87
|
+
) -> Response[list[AuditLogEntry]]:
|
|
88
|
+
r"""Query the audit log
|
|
89
|
+
|
|
90
|
+
Every create, read, update, and delete call is recorded here -
|
|
91
|
+
this is what answers \"did anyone fetch this ciphertext\" during a
|
|
92
|
+
rotation or incident, since v1 has no pre-fetch access check.
|
|
93
|
+
Filters combine with AND when more than one is given.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
object_id (str | Unset):
|
|
97
|
+
caller (str | Unset):
|
|
98
|
+
from_ (datetime.datetime | Unset):
|
|
99
|
+
to (datetime.datetime | Unset):
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
103
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
Response[list[AuditLogEntry]]
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
kwargs = _get_kwargs(
|
|
110
|
+
object_id=object_id,
|
|
111
|
+
caller=caller,
|
|
112
|
+
from_=from_,
|
|
113
|
+
to=to,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
response = client.get_httpx_client().request(
|
|
117
|
+
**kwargs,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
return _build_response(client=client, response=response)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def sync(
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient | Client,
|
|
126
|
+
object_id: str | Unset = UNSET,
|
|
127
|
+
caller: str | Unset = UNSET,
|
|
128
|
+
from_: datetime.datetime | Unset = UNSET,
|
|
129
|
+
to: datetime.datetime | Unset = UNSET,
|
|
130
|
+
) -> list[AuditLogEntry] | None:
|
|
131
|
+
r"""Query the audit log
|
|
132
|
+
|
|
133
|
+
Every create, read, update, and delete call is recorded here -
|
|
134
|
+
this is what answers \"did anyone fetch this ciphertext\" during a
|
|
135
|
+
rotation or incident, since v1 has no pre-fetch access check.
|
|
136
|
+
Filters combine with AND when more than one is given.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
object_id (str | Unset):
|
|
140
|
+
caller (str | Unset):
|
|
141
|
+
from_ (datetime.datetime | Unset):
|
|
142
|
+
to (datetime.datetime | Unset):
|
|
143
|
+
|
|
144
|
+
Raises:
|
|
145
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
146
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
list[AuditLogEntry]
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
return sync_detailed(
|
|
153
|
+
client=client,
|
|
154
|
+
object_id=object_id,
|
|
155
|
+
caller=caller,
|
|
156
|
+
from_=from_,
|
|
157
|
+
to=to,
|
|
158
|
+
).parsed
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
async def asyncio_detailed(
|
|
162
|
+
*,
|
|
163
|
+
client: AuthenticatedClient | Client,
|
|
164
|
+
object_id: str | Unset = UNSET,
|
|
165
|
+
caller: str | Unset = UNSET,
|
|
166
|
+
from_: datetime.datetime | Unset = UNSET,
|
|
167
|
+
to: datetime.datetime | Unset = UNSET,
|
|
168
|
+
) -> Response[list[AuditLogEntry]]:
|
|
169
|
+
r"""Query the audit log
|
|
170
|
+
|
|
171
|
+
Every create, read, update, and delete call is recorded here -
|
|
172
|
+
this is what answers \"did anyone fetch this ciphertext\" during a
|
|
173
|
+
rotation or incident, since v1 has no pre-fetch access check.
|
|
174
|
+
Filters combine with AND when more than one is given.
|
|
175
|
+
|
|
176
|
+
Args:
|
|
177
|
+
object_id (str | Unset):
|
|
178
|
+
caller (str | Unset):
|
|
179
|
+
from_ (datetime.datetime | Unset):
|
|
180
|
+
to (datetime.datetime | Unset):
|
|
181
|
+
|
|
182
|
+
Raises:
|
|
183
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
184
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
185
|
+
|
|
186
|
+
Returns:
|
|
187
|
+
Response[list[AuditLogEntry]]
|
|
188
|
+
"""
|
|
189
|
+
|
|
190
|
+
kwargs = _get_kwargs(
|
|
191
|
+
object_id=object_id,
|
|
192
|
+
caller=caller,
|
|
193
|
+
from_=from_,
|
|
194
|
+
to=to,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
198
|
+
|
|
199
|
+
return _build_response(client=client, response=response)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
async def asyncio(
|
|
203
|
+
*,
|
|
204
|
+
client: AuthenticatedClient | Client,
|
|
205
|
+
object_id: str | Unset = UNSET,
|
|
206
|
+
caller: str | Unset = UNSET,
|
|
207
|
+
from_: datetime.datetime | Unset = UNSET,
|
|
208
|
+
to: datetime.datetime | Unset = UNSET,
|
|
209
|
+
) -> list[AuditLogEntry] | None:
|
|
210
|
+
r"""Query the audit log
|
|
211
|
+
|
|
212
|
+
Every create, read, update, and delete call is recorded here -
|
|
213
|
+
this is what answers \"did anyone fetch this ciphertext\" during a
|
|
214
|
+
rotation or incident, since v1 has no pre-fetch access check.
|
|
215
|
+
Filters combine with AND when more than one is given.
|
|
216
|
+
|
|
217
|
+
Args:
|
|
218
|
+
object_id (str | Unset):
|
|
219
|
+
caller (str | Unset):
|
|
220
|
+
from_ (datetime.datetime | Unset):
|
|
221
|
+
to (datetime.datetime | Unset):
|
|
222
|
+
|
|
223
|
+
Raises:
|
|
224
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
225
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
226
|
+
|
|
227
|
+
Returns:
|
|
228
|
+
list[AuditLogEntry]
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
return (
|
|
232
|
+
await asyncio_detailed(
|
|
233
|
+
client=client,
|
|
234
|
+
object_id=object_id,
|
|
235
|
+
caller=caller,
|
|
236
|
+
from_=from_,
|
|
237
|
+
to=to,
|
|
238
|
+
)
|
|
239
|
+
).parsed
|