python3-core-api-client 2.5__tar.gz → 2.7__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.
Files changed (66) hide show
  1. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/PKG-INFO +19 -2
  2. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/README.md +18 -1
  3. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/pyproject.toml +1 -1
  4. python3_core_api_client-2.7/src/cyberfusion/CoreApiClient/_helpers.py +12 -0
  5. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/models.py +133 -137
  6. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/basic_authentication_realms.py +6 -4
  7. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/borg_archives.py +9 -4
  8. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/borg_repositories.py +6 -4
  9. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/certificate_managers.py +6 -4
  10. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/certificates.py +9 -4
  11. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/clusters.py +104 -133
  12. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/cmses.py +9 -4
  13. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/crons.py +9 -4
  14. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/custom_config_snippets.py +6 -4
  15. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/custom_configs.py +9 -4
  16. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/customers.py +9 -4
  17. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/daemons.py +9 -4
  18. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/database_user_grants.py +4 -3
  19. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/database_users.py +9 -4
  20. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/databases.py +14 -7
  21. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/domain_routers.py +4 -3
  22. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/firewall_groups.py +9 -4
  23. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/firewall_rules.py +9 -4
  24. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/fpm_pools.py +9 -4
  25. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/ftp_users.py +9 -4
  26. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/haproxy_listens.py +9 -4
  27. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/haproxy_listens_to_nodes.py +6 -4
  28. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/hosts_entries.py +9 -4
  29. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/htpasswd_files.py +9 -4
  30. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/htpasswd_users.py +9 -4
  31. python3_core_api_client-2.7/src/cyberfusion/CoreApiClient/resources/logs.py +51 -0
  32. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/mail_accounts.py +14 -7
  33. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/mail_aliases.py +9 -4
  34. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/mail_domains.py +8 -4
  35. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/mail_hostnames.py +9 -4
  36. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/malwares.py +4 -3
  37. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/mariadb_encryption_keys.py +6 -4
  38. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/node_add_ons.py +9 -4
  39. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/nodes.py +28 -4
  40. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/passenger_apps.py +9 -4
  41. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/redis_instances.py +9 -4
  42. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/regions.py +4 -3
  43. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/root_ssh_keys.py +9 -4
  44. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/security_txt_policies.py +6 -4
  45. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/ssh_keys.py +9 -4
  46. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/task_collections.py +4 -1
  47. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/tombstones.py +4 -3
  48. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/unix_users.py +14 -7
  49. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/url_redirects.py +9 -4
  50. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/virtual_hosts.py +53 -4
  51. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/python3_core_api_client.egg-info/PKG-INFO +19 -2
  52. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/python3_core_api_client.egg-info/SOURCES.txt +1 -0
  53. python3_core_api_client-2.5/src/cyberfusion/CoreApiClient/resources/logs.py +0 -95
  54. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/setup.cfg +0 -0
  55. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/__init__.py +0 -0
  56. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/_encoders.py +0 -0
  57. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/connector.py +0 -0
  58. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/exceptions.py +0 -0
  59. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/http.py +0 -0
  60. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/interfaces.py +0 -0
  61. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/__init__.py +0 -0
  62. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/health.py +0 -0
  63. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/cyberfusion/CoreApiClient/resources/login.py +0 -0
  64. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/python3_core_api_client.egg-info/dependency_links.txt +0 -0
  65. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/python3_core_api_client.egg-info/requires.txt +0 -0
  66. {python3_core_api_client-2.5 → python3_core_api_client-2.7}/src/python3_core_api_client.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python3-core-api-client
3
- Version: 2.5
3
+ Version: 2.7
4
4
  Summary: Python client for Core API.
5
5
  Author-email: Cyberfusion <support@cyberfusion.io>
6
6
  Project-URL: Source, https://github.com/CyberfusionIO/python3-core-api-client
@@ -13,7 +13,7 @@ Requires-Dist: pydantic[dotenv,email]==1.10.4
13
13
 
14
14
  Python client for Core API.
15
15
 
16
- This client was built for and tested on the **1.252** version of the API.
16
+ This client was built for and tested on the **1.256** version of the API.
17
17
 
18
18
  ## Support
19
19
 
@@ -74,6 +74,23 @@ response = connector.virtual_hosts.list_virtual_hosts()
74
74
  virtual_hosts = response.dto
75
75
  ```
76
76
 
77
+ By default, no objects are included. You can manually specify which objects you wish to include, for example:
78
+
79
+ ```python
80
+ from cyberfusion.CoreApiClient.connector import CoreApiConnector
81
+
82
+ connector = CoreApiConnector(
83
+ username='username', password='password'
84
+ )
85
+
86
+ response = connector.virtual_hosts.read_virtual_host(includes=["unix_user,cluster.region"])
87
+
88
+ virtual_host = response.dto
89
+
90
+ unix_user = virtual_host.includes.unix_user
91
+ region = virtual_host.includes.cluster.includes.region
92
+ ```
93
+
77
94
  ## Authentication
78
95
 
79
96
  This client takes care of authentication.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Python client for Core API.
4
4
 
5
- This client was built for and tested on the **1.252** version of the API.
5
+ This client was built for and tested on the **1.256** version of the API.
6
6
 
7
7
  ## Support
8
8
 
@@ -63,6 +63,23 @@ response = connector.virtual_hosts.list_virtual_hosts()
63
63
  virtual_hosts = response.dto
64
64
  ```
65
65
 
66
+ By default, no objects are included. You can manually specify which objects you wish to include, for example:
67
+
68
+ ```python
69
+ from cyberfusion.CoreApiClient.connector import CoreApiConnector
70
+
71
+ connector = CoreApiConnector(
72
+ username='username', password='password'
73
+ )
74
+
75
+ response = connector.virtual_hosts.read_virtual_host(includes=["unix_user,cluster.region"])
76
+
77
+ virtual_host = response.dto
78
+
79
+ unix_user = virtual_host.includes.unix_user
80
+ region = virtual_host.includes.cluster.includes.region
81
+ ```
82
+
66
83
  ## Authentication
67
84
 
68
85
  This client takes care of authentication.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python3-core-api-client"
7
- version = "2.5"
7
+ version = "2.7"
8
8
  description = "Python client for Core API."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -0,0 +1,12 @@
1
+ from typing import Literal
2
+
3
+
4
+ def construct_includes_query_parameter(
5
+ includes: list[str] | None,
6
+ ) -> dict[Literal["includes"], str]:
7
+ if includes is None:
8
+ return {}
9
+
10
+ return {
11
+ "includes": ",".join(includes),
12
+ }