Added my python API class#16
Conversation
| @@ -0,0 +1,15 @@ | |||
| ISC License | |||
There was a problem hiding this comment.
is there a reason you picked ISC instead of apache2 here?
| ''' | ||
| Retrieve data about ROAs by ASN | ||
|
|
||
| :param asn: The ASN you would like to query either as a number or in AS12345 format |
There was a problem hiding this comment.
there's a pylint line length limit of 80 chars.
(I'm not sure that pylint applies here, but.. it's sure handy!)
There was a problem hiding this comment.
Are you telling me my lines have to be 80 chars to be approved for merging, or just suggesting it?
There was a problem hiding this comment.
i'm saying that the python linter is going to complain, so it'd sure be nicer if it didn't complain.
|
|
||
| :param endpoint: The endpoint you would like to query | ||
| ''' | ||
| headers = {'Accept': 'application/json', 'Authorization': 'Bearer ' + self.api_key} |
| '''List conformance for all IXPs that are participanting in MANRS''' | ||
| return self.call('/conformance/ixps') | ||
|
|
||
| def conformance_by_network_operator(self) -> dict: |
| return self.call('/conformance/net-ops') | ||
|
|
||
| def conformance_by_vendor(self) -> dict: | ||
| '''List conformance for all equipment vendors that are participanting in MANRS''' |
|
I'm one of the developers at the Internet Society and I work closely on the MANRS project (and am primarily responsible for the API). Thanks for the PR, it's great to see the community use the API and create tools to help others use it. Have you looked into tools that can generate clients from the OpenAPI spec that we publish? Some examples are:
Personally, I would be concerned about publishing a "static" client that needs manual updating when the API changes. Using an auto-generated client allows users to be in complete control of how and when they update without relying on downstream repositories. I have used the first tool listed above before, though not to create a Python client. |
I was suggested via email to create a PR for the API class I created for MANRS