Skip to content

Commit 583c2a9

Browse files
Update Python SDK (#45)
* ci: Update python-sdk * test: remove * docs: remove --------- Co-authored-by: maddawik <[email protected]> Co-authored-by: maddawik <[email protected]>
1 parent b25f416 commit 583c2a9

16 files changed

+85003
-8340
lines changed

.openapi-generator/FILES

-3
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ docs/ModelsEntitlements.md
705705
docs/PaginateMatch.md
706706
docs/PaginatePagination.md
707707
docs/PaginateParam.md
708-
docs/ParamsIdxReqParams.md
709708
docs/ParamsIndexBackup.md
710709
docs/ParamsIndexBackupList.md
711710
docs/ParamsIndexList.md
@@ -1813,7 +1812,6 @@ test/test_models_entitlements.py
18131812
test/test_paginate_match.py
18141813
test/test_paginate_pagination.py
18151814
test/test_paginate_param.py
1816-
test/test_params_idx_req_params.py
18171815
test/test_params_index_backup.py
18181816
test/test_params_index_backup_list.py
18191817
test/test_params_index_list.py
@@ -2922,7 +2920,6 @@ vulncheck_sdk/models/models_entitlements.py
29222920
vulncheck_sdk/models/paginate_match.py
29232921
vulncheck_sdk/models/paginate_pagination.py
29242922
vulncheck_sdk/models/paginate_param.py
2925-
vulncheck_sdk/models/params_idx_req_params.py
29262923
vulncheck_sdk/models/params_index_backup.py
29272924
vulncheck_sdk/models/params_index_backup_list.py
29282925
vulncheck_sdk/models/params_index_list.py

README.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,10 @@ with vulncheck_sdk.ApiClient(configuration) as api_client:
8787
### IndicesApi has methods for each index
8888
indices_client = vulncheck_sdk.IndicesApi(api_client)
8989

90-
# You can filter your query using parameters as well
91-
query_params = vulncheck_sdk.ParamsIdxReqParams(cve="CVE-2019-19781")
92-
api_response = indices_client.index_vulncheck_nvd2_get(query_params)
90+
# Add query parameters to filter what you need
91+
api_response = indices_client.index_vulncheck_nvd2_get(cve="CVE-2019-19781")
9392

9493
print(api_response.data)
95-
96-
# There are many more indices to explore!
97-
api_response = indices_client.index_vulncheck_kev_get(vulncheck_sdk.ParamsIdxReqParams())
98-
api_response = indices_client.index_exploits_get(vulncheck_sdk.ParamsIdxReqParams())
99-
api_response = indices_client.index_ipintel3d_get(vulncheck_sdk.ParamsIdxReqParams())
100-
api_response = indices_client. # An editor with a Language Server will show you all the available methods/indices!
10194
```
10295

10396
## Examples
@@ -224,8 +217,7 @@ configuration.api_key["Bearer"] = TOKEN
224217
with vulncheck_sdk.ApiClient(configuration) as api_client:
225218
indices_client = vulncheck_sdk.IndicesApi(api_client)
226219

227-
query_params = vulncheck_sdk.ParamsIdxReqParams(cve="CVE-2019-19781")
228-
api_response = indices_client.index_vulncheck_nvd2_get(query_params)
220+
api_response = indices_client.index_vulncheck_nvd2_get(cve="CVE-2019-19781")
229221

230222
print(api_response.data)
231223
```
@@ -247,7 +239,6 @@ configuration.api_key["Bearer"] = TOKEN
247239
with vulncheck_sdk.ApiClient(configuration) as api_client:
248240
indices_client = vulncheck_sdk.IndicesApi(api_client)
249241
api_response = indices_client.index_vulncheck_kev_get(
250-
vulncheck_sdk.ParamsIdxReqParams(),
251242
start_cursor="true",
252243
# `limit` increases the size of each page, making it faster
253244
# to download large datasets
@@ -258,7 +249,7 @@ with vulncheck_sdk.ApiClient(configuration) as api_client:
258249

259250
while api_response.meta.next_cursor is not None:
260251
api_response = indices_client.index_vulncheck_kev_get(
261-
vulncheck_sdk.ParamsIdxReqParams(), cursor=api_response.meta.next_cursor
252+
cursor=api_response.meta.next_cursor
262253
)
263254
print(api_response.data)
264255
```

docs/IndicesApi.md

+9,664-2,005
Large diffs are not rendered by default.

docs/ParamsIdxReqParams.md

-55
This file was deleted.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vulncheck_sdk"
3-
version = "0.0.6"
3+
version = "0.0.7"
44
description = "VulnCheck API"
55
authors = ["VulnCheck API Support <[email protected]>"]
66
license = "Apache-2.0"

python-generator-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ additionalProperties:
22
projectName: "vulncheck-sdk"
33
packageName: "vulncheck_sdk"
44
packageUrl: "https://github.com/vulncheck-oss/sdk-python/tree/main"
5-
packageVersion: "0.0.6"
5+
packageVersion: "0.0.7"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# prerequisite: setuptools
2323
# http://pypi.python.org/pypi/setuptools
2424
NAME = "vulncheck-sdk"
25-
VERSION = "0.0.6"
25+
VERSION = "0.0.7"
2626
PYTHON_REQUIRES = ">= 3.8"
2727
REQUIRES = [
2828
"urllib3 >= 1.25.3, < 3.0.0",

test/test_params_idx_req_params.py

-77
This file was deleted.

tests/integration_test.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from vulncheck_sdk.api.indices_api import IndicesApi
55
from vulncheck_sdk.api_response import ApiResponse
66
from vulncheck_sdk.exceptions import ApiException, UnauthorizedException
7-
from vulncheck_sdk.models.params_idx_req_params import ParamsIdxReqParams
87

98
DEFAULT_HOST = "https://api.vulncheck.com"
109
DEFAULT_API = DEFAULT_HOST + "/v3"
@@ -90,7 +89,6 @@ def test_rules_initial_access_type_get():
9089

9190
def test_all_indicies():
9291
indices_instance = _get_indices_instance(API_TOKEN)
93-
params = ParamsIdxReqParams()
9492
for name in dir(indices_instance):
9593
if (
9694
callable(getattr(indices_instance, name))
@@ -101,7 +99,7 @@ def test_all_indicies():
10199
):
102100
method = getattr(indices_instance, name)
103101
print(name)
104-
status = _get_http_status(method, params, 1, 1)
102+
status = _get_http_status(method, 1, 1)
105103
assert status == 200
106104

107105

vulncheck_sdk/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
""" # noqa: E501
1616

1717

18-
__version__ = "0.0.6"
18+
__version__ = "0.0.7"
1919

2020
# import apis into sdk package
2121
from vulncheck_sdk.api.endpoints_api import EndpointsApi
@@ -737,7 +737,6 @@
737737
from vulncheck_sdk.models.paginate_match import PaginateMatch
738738
from vulncheck_sdk.models.paginate_pagination import PaginatePagination
739739
from vulncheck_sdk.models.paginate_param import PaginateParam
740-
from vulncheck_sdk.models.params_idx_req_params import ParamsIdxReqParams
741740
from vulncheck_sdk.models.params_index_backup import ParamsIndexBackup
742741
from vulncheck_sdk.models.params_index_backup_list import ParamsIndexBackupList
743742
from vulncheck_sdk.models.params_index_list import ParamsIndexList

0 commit comments

Comments
 (0)