pyixapi 0.2.6__tar.gz → 0.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.
@@ -1,23 +1,24 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: pyixapi
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Python API client library for IX-API
5
- License: Apache-2.0
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
6
7
  Author: Guillaume Mazoyer
7
8
  Author-email: oss@mazoyer.eu
8
- Requires-Python: >=3.9
9
+ Requires-Python: >=3.10
9
10
  Classifier: Intended Audience :: Developers
10
11
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
16
17
  Provides-Extra: dev
17
18
  Requires-Dist: PyJWT (>=2.4.0,<2.11)
18
19
  Requires-Dist: pytest ; extra == "dev"
19
- Requires-Dist: requests (>=2.20.0,<3.0)
20
- Requires-Dist: ruff (>=0.9,<0.10) ; extra == "dev"
20
+ Requires-Dist: requests (>=2.32.4,<3.0)
21
+ Requires-Dist: ruff (>=0.14,<0.15) ; extra == "dev"
21
22
  Description-Content-Type: text/markdown
22
23
 
23
24
  # pyixapi
@@ -26,7 +27,7 @@ Python API client library for [IX-API](https://ix-api.net/).
26
27
 
27
28
  Supported versions are:
28
29
 
29
- * [version 1](https://docs.ix-api.net/v1/)
30
+ * [version 1](https://docs.ix-api.net/v1/) -- deprecated, providers cease date is 2026-07-01
30
31
  * [version 2](https://docs.ix-api.net/v2/)
31
32
 
32
33
  ## Installation
@@ -40,7 +41,7 @@ To begin, import pyixapi and instantiate the API.
40
41
  ```python
41
42
  import pyixapi
42
43
  ixapi = pyixapi.api(
43
- "https://api.de-cix.net/api/v1/",
44
+ "https://api.de-cix.net/api/v2/",
44
45
  "3LH3G72VH7H1SGogEsFeQOPsGjOQotMUZQRt2pK7YbH",
45
46
  "cEtrt8s0vR0CsG0vpAmcaxtnolzZj7DEG0B7izvwPlV",
46
47
  )
@@ -4,7 +4,7 @@ Python API client library for [IX-API](https://ix-api.net/).
4
4
 
5
5
  Supported versions are:
6
6
 
7
- * [version 1](https://docs.ix-api.net/v1/)
7
+ * [version 1](https://docs.ix-api.net/v1/) -- deprecated, providers cease date is 2026-07-01
8
8
  * [version 2](https://docs.ix-api.net/v2/)
9
9
 
10
10
  ## Installation
@@ -18,7 +18,7 @@ To begin, import pyixapi and instantiate the API.
18
18
  ```python
19
19
  import pyixapi
20
20
  ixapi = pyixapi.api(
21
- "https://api.de-cix.net/api/v1/",
21
+ "https://api.de-cix.net/api/v2/",
22
22
  "3LH3G72VH7H1SGogEsFeQOPsGjOQotMUZQRt2pK7YbH",
23
23
  "cEtrt8s0vR0CsG0vpAmcaxtnolzZj7DEG0B7izvwPlV",
24
24
  )
@@ -1,3 +1,5 @@
1
+ import warnings
2
+
1
3
  import requests
2
4
 
3
5
  from pyixapi.core.endpoint import Endpoint
@@ -29,7 +31,7 @@ from pyixapi.models import (
29
31
  RoleAssignment,
30
32
  )
31
33
 
32
- __version__ = "0.2.6"
34
+ __version__ = "0.2.7"
33
35
 
34
36
 
35
37
  class API(object):
@@ -67,36 +69,26 @@ class API(object):
67
69
  self.facilities = Endpoint(self, "facilities", model=Facility)
68
70
  self.ips = Endpoint(self, "ips", model=IP)
69
71
  self.macs = Endpoint(self, "macs", model=MAC)
70
- self.network_feature_configs = Endpoint(
71
- self, "network-feature-configs", model=NetworkFeatureConfig
72
- )
72
+ self.network_feature_configs = Endpoint(self, "network-feature-configs", model=NetworkFeatureConfig)
73
73
  self.network_features = Endpoint(self, "network-features", model=NetworkFeature)
74
- self.network_service_configs = Endpoint(
75
- self, "network-service-configs", model=NetworkServiceConfig
76
- )
74
+ self.network_service_configs = Endpoint(self, "network-service-configs", model=NetworkServiceConfig)
77
75
  self.network_services = Endpoint(self, "network-services", model=NetworkService)
78
76
  self.pops = Endpoint(self, "pops", model=PoP)
79
77
  # Version 2+
80
- self.member_joining_rules = Endpoint(
81
- self, "member-joining-rules", model=MemberJoiningRule
82
- )
78
+ self.member_joining_rules = Endpoint(self, "member-joining-rules", model=MemberJoiningRule)
83
79
  self.metro_areas = Endpoint(self, "metro-areas", model=MetroArea)
84
- self.metro_area_networks = Endpoint(
85
- self, "metro-area-networks", model=MetroAreaNetwork
86
- )
80
+ self.metro_area_networks = Endpoint(self, "metro-area-networks", model=MetroAreaNetwork)
87
81
  self.ports = Endpoint(self, "ports", model=Port)
88
- self.port_reservations = Endpoint(
89
- self, "port-reservations", model=PortReservation
90
- )
82
+ self.port_reservations = Endpoint(self, "port-reservations", model=PortReservation)
91
83
  self.roles = Endpoint(self, "roles", model=Role)
92
84
  self.role_assignments = Endpoint(self, "role-assignments", model=RoleAssignment)
93
85
 
94
86
  @property
95
- def version(self):
87
+ def version(self) -> int:
96
88
  """
97
89
  Get the API version of IX-API.
98
90
  """
99
- return Request(
91
+ version = Request(
100
92
  base=self.url,
101
93
  token=self.access_token,
102
94
  http_session=self.http_session,
@@ -104,11 +96,18 @@ class API(object):
104
96
  proxies=self.proxies,
105
97
  ).get_version()
106
98
 
99
+ if version == 1:
100
+ warnings.warn(
101
+ "IX-API version 1 is deprecated and will not be supported in future releases of pyixapi.",
102
+ DeprecationWarning,
103
+ stacklevel=2,
104
+ )
105
+
106
+ return version
107
+
107
108
  @property
108
109
  def accounts(self):
109
- return Endpoint(
110
- self, "customers" if self.version == 1 else "accounts", model=Account
111
- )
110
+ return Endpoint(self, "customers" if self.version == 1 else "accounts", model=Account)
112
111
 
113
112
  @property
114
113
  def product_offerings(self):
@@ -97,7 +97,7 @@ class Request(object):
97
97
 
98
98
  Issue a GET request to the health endpoint to read the API version.
99
99
 
100
- If a RequestError is raised, it is catched and the version is considered as
100
+ If a RequestError is raised, it is caught and the version is considered as
101
101
  equal to 1 (IX-API v1 does not have a health endpoint).
102
102
  """
103
103
  try:
@@ -1,24 +1,24 @@
1
1
  [project]
2
2
  name = "pyixapi"
3
- version = "0.2.6"
3
+ version = "0.2.7"
4
4
  description = "Python API client library for IX-API"
5
5
  authors = [{ name = "Guillaume Mazoyer", email = "oss@mazoyer.eu" }]
6
6
  readme = "README.md"
7
7
  license = "Apache-2.0"
8
- requires-python = ">=3.9"
8
+ requires-python = ">=3.10"
9
9
  classifiers = [
10
10
  "Intended Audience :: Developers",
11
11
  "Programming Language :: Python :: 3",
12
- "Programming Language :: Python :: 3.9",
13
12
  "Programming Language :: Python :: 3.10",
14
13
  "Programming Language :: Python :: 3.11",
15
14
  "Programming Language :: Python :: 3.12",
16
15
  "Programming Language :: Python :: 3.13",
16
+ "Programming Language :: Python :: 3.14",
17
17
  ]
18
- dependencies = ["PyJWT>=2.4.0,<2.11", "requests>=2.20.0,<3.0"]
18
+ dependencies = ["PyJWT>=2.4.0,<2.11", "requests>=2.32.4,<3.0"]
19
19
 
20
20
  [project.optional-dependencies]
21
- dev = ["pytest", "ruff>=0.9,<0.10"]
21
+ dev = ["pytest", "ruff>=0.14,<0.15"]
22
22
 
23
23
  [tool.poetry]
24
24
  requires-poetry = ">=2.0"
File without changes
File without changes
File without changes
File without changes
File without changes