pyixapi 0.2.0__tar.gz → 0.2.1__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 (40) hide show
  1. {pyixapi-0.2.0/pyixapi.egg-info → pyixapi-0.2.1}/PKG-INFO +1 -1
  2. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/api.py +9 -6
  3. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/models.py +4 -12
  4. {pyixapi-0.2.0 → pyixapi-0.2.1/pyixapi.egg-info}/PKG-INFO +1 -1
  5. {pyixapi-0.2.0 → pyixapi-0.2.1}/.github/FUNDING.yml +0 -0
  6. {pyixapi-0.2.0 → pyixapi-0.2.1}/.github/dependabot.yml +0 -0
  7. {pyixapi-0.2.0 → pyixapi-0.2.1}/.github/workflows/publish.yml +0 -0
  8. {pyixapi-0.2.0 → pyixapi-0.2.1}/.github/workflows/tests.yml +0 -0
  9. {pyixapi-0.2.0 → pyixapi-0.2.1}/.gitignore +0 -0
  10. {pyixapi-0.2.0 → pyixapi-0.2.1}/LICENSE +0 -0
  11. {pyixapi-0.2.0 → pyixapi-0.2.1}/README.md +0 -0
  12. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/Makefile +0 -0
  13. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/advanced.rst +0 -0
  14. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/conf.py +0 -0
  15. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/endpoint.rst +0 -0
  16. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/index.rst +0 -0
  17. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/request.rst +0 -0
  18. {pyixapi-0.2.0 → pyixapi-0.2.1}/docs/response.rst +0 -0
  19. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/__init__.py +0 -0
  20. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/__init__.py +0 -0
  21. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/endpoint.py +0 -0
  22. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/query.py +0 -0
  23. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/response.py +0 -0
  24. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/token.py +0 -0
  25. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi/core/util.py +0 -0
  26. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi.egg-info/SOURCES.txt +0 -0
  27. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi.egg-info/dependency_links.txt +0 -0
  28. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi.egg-info/not-zip-safe +0 -0
  29. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi.egg-info/requires.txt +0 -0
  30. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyixapi.egg-info/top_level.txt +0 -0
  31. {pyixapi-0.2.0 → pyixapi-0.2.1}/pyproject.toml +0 -0
  32. {pyixapi-0.2.0 → pyixapi-0.2.1}/requirements-dev.txt +0 -0
  33. {pyixapi-0.2.0 → pyixapi-0.2.1}/requirements.txt +0 -0
  34. {pyixapi-0.2.0 → pyixapi-0.2.1}/setup.cfg +0 -0
  35. {pyixapi-0.2.0 → pyixapi-0.2.1}/setup.py +0 -0
  36. {pyixapi-0.2.0 → pyixapi-0.2.1}/tests/__init__.py +0 -0
  37. {pyixapi-0.2.0 → pyixapi-0.2.1}/tests/fixtures/api/authenticate.json +0 -0
  38. {pyixapi-0.2.0 → pyixapi-0.2.1}/tests/fixtures/api/refresh_authentication.json +0 -0
  39. {pyixapi-0.2.0 → pyixapi-0.2.1}/tests/test_api.py +0 -0
  40. {pyixapi-0.2.0 → pyixapi-0.2.1}/tests/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyixapi
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: IX-API client library
5
5
  Home-page: https://github.com/peering-manager/pyixapi
6
6
  Author: Guillaume Mazoyer
@@ -24,13 +24,12 @@ from pyixapi.models import (
24
24
  PoP,
25
25
  Port,
26
26
  PortReservation,
27
- Product,
28
27
  ProductOffering,
29
28
  Role,
30
29
  RoleAssignment,
31
30
  )
32
31
 
33
- __version__ = "0.2.0"
32
+ __version__ = "0.2.1"
34
33
 
35
34
 
36
35
  class API(object):
@@ -75,7 +74,6 @@ class API(object):
75
74
  )
76
75
  self.network_services = Endpoint(self, "network-services", model=NetworkService)
77
76
  self.pops = Endpoint(self, "pops", model=PoP)
78
- self.products = Endpoint(self, "products", model=Product)
79
77
  # Version 2+
80
78
  self.member_joining_rules = Endpoint(
81
79
  self, "member-joining-rules", model=MemberJoiningRule
@@ -88,9 +86,6 @@ class API(object):
88
86
  self.port_reservations = Endpoint(
89
87
  self, "port-reservations", model=PortReservation
90
88
  )
91
- self.product_offerings = Endpoint(
92
- self, "product-offerings", model=ProductOffering
93
- )
94
89
  self.roles = Endpoint(self, "roles", model=Role)
95
90
  self.role_assignments = Endpoint(self, "role-assignments", model=RoleAssignment)
96
91
 
@@ -109,6 +104,14 @@ class API(object):
109
104
  self, "customers" if self.version == 1 else "accounts", model=Account
110
105
  )
111
106
 
107
+ @property
108
+ def product_offerings(self):
109
+ return Endpoint(
110
+ self,
111
+ "products" if self.version == 1 else "product-offerings",
112
+ model=ProductOffering,
113
+ )
114
+
112
115
  def authenticate(self):
113
116
  """
114
117
  Authenticate and generate a pair of tokens.
@@ -154,10 +154,11 @@ class PoP(Record):
154
154
  return self.name
155
155
 
156
156
 
157
- class Product(Record):
157
+ class ProductOffering(Record):
158
158
  """
159
- A Product is a network or peering-related product of a defined type sold by an IXP
160
- to its customers.
159
+ A ProductOffering is an offer made by an exchange to be consumed by a client.
160
+
161
+ It is also referenced as "product" in IX-API v1.
161
162
  """
162
163
 
163
164
  def __str__(self):
@@ -226,15 +227,6 @@ class PortReservation(Record):
226
227
  return self.id
227
228
 
228
229
 
229
- class ProductOffering(Record):
230
- """
231
- A ProductOffering is an offer made by an exchange to be consumed by a client.
232
- """
233
-
234
- def __str__(self):
235
- return self.name
236
-
237
-
238
230
  class Role(Record):
239
231
  """
240
232
  A Role enables a Contact to act for a specific purpose.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyixapi
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: IX-API client library
5
5
  Home-page: https://github.com/peering-manager/pyixapi
6
6
  Author: Guillaume Mazoyer
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
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
File without changes
File without changes