hakai_api 2.0.0__tar.gz → 2.0.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.
- {hakai_api-2.0.0 → hakai_api-2.0.1}/.github/workflows/release.yaml +2 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/PKG-INFO +4 -3
- {hakai_api-2.0.0 → hakai_api-2.0.1}/README.md +3 -2
- {hakai_api-2.0.0 → hakai_api-2.0.1}/pyproject.toml +1 -1
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/client.py +2 -2
- {hakai_api-2.0.0 → hakai_api-2.0.1}/uv.lock +1 -1
- {hakai_api-2.0.0 → hakai_api-2.0.1}/.github/workflows/lint.yaml +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/.github/workflows/test.yaml +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/.gitignore +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/.pre-commit-config.yaml +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/CODEOWNERS +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/CONTRIBUTING.md +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/LICENSE +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/example.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/__init__.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/auth/__init__.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/auth/base.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/auth/desktop.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/auth/desktop_callback.html +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/src/hakai_api/auth/web.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/tests/__init__.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/tests/test_auth_strategies.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/tests/test_backwards_compatability.py +0 -0
- {hakai_api-2.0.0 → hakai_api-2.0.1}/tests/test_client.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hakai_api
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Get Hakai database resources using http calls
|
|
5
5
|
Author-email: Taylor Denouden <taylor.denouden@hakai.org>, Chris Davis <chris.davis@hakai.org>, Nate Rosenstock <nate.rosenstock@hakai.org>, Sam Albers <sam.albers@hakai.org>
|
|
6
6
|
Maintainer-email: Taylor Denouden <taylor.denouden@hakai.org>, Sam Albers <sam.albers@hakai.org>
|
|
@@ -102,6 +102,7 @@ client = Client(user_agent="MyApp/1.0 (contact@example.com)")
|
|
|
102
102
|
# Or set via environment variable
|
|
103
103
|
os.environ['HAKAI_API_USER_AGENT'] = "MyApp/1.0 (contact@example.com)"
|
|
104
104
|
client = Client()
|
|
105
|
+
```
|
|
105
106
|
|
|
106
107
|
# Methods
|
|
107
108
|
|
|
@@ -126,7 +127,7 @@ from, see the [Hakai API documentation](https://github.com/HakaiInstitute/hakai-
|
|
|
126
127
|
## Custom API Endpoints
|
|
127
128
|
|
|
128
129
|
You can specify which API to access when instantiating the Client. By default, the API
|
|
129
|
-
uses `https://
|
|
130
|
+
uses `https://portal.hakai.org/api` as the API root. It may be useful to use this
|
|
130
131
|
library to access a locally running API instance or to access the Goose API for testing
|
|
131
132
|
purposes. If you are always going to be accessing data from a locally running API
|
|
132
133
|
instance, you are better off using the requests.py library directly since Authorization
|
|
@@ -151,7 +152,7 @@ client = Client()
|
|
|
151
152
|
|
|
152
153
|
# These are equivalent:
|
|
153
154
|
response1 = client.get('/eims/views/output/stations')
|
|
154
|
-
response2 = client.get('https://
|
|
155
|
+
response2 = client.get('https://portal.hakai.org/api/eims/views/output/stations')
|
|
155
156
|
```
|
|
156
157
|
|
|
157
158
|
## Credentials Configuration
|
|
@@ -86,6 +86,7 @@ client = Client(user_agent="MyApp/1.0 (contact@example.com)")
|
|
|
86
86
|
# Or set via environment variable
|
|
87
87
|
os.environ['HAKAI_API_USER_AGENT'] = "MyApp/1.0 (contact@example.com)"
|
|
88
88
|
client = Client()
|
|
89
|
+
```
|
|
89
90
|
|
|
90
91
|
# Methods
|
|
91
92
|
|
|
@@ -110,7 +111,7 @@ from, see the [Hakai API documentation](https://github.com/HakaiInstitute/hakai-
|
|
|
110
111
|
## Custom API Endpoints
|
|
111
112
|
|
|
112
113
|
You can specify which API to access when instantiating the Client. By default, the API
|
|
113
|
-
uses `https://
|
|
114
|
+
uses `https://portal.hakai.org/api` as the API root. It may be useful to use this
|
|
114
115
|
library to access a locally running API instance or to access the Goose API for testing
|
|
115
116
|
purposes. If you are always going to be accessing data from a locally running API
|
|
116
117
|
instance, you are better off using the requests.py library directly since Authorization
|
|
@@ -135,7 +136,7 @@ client = Client()
|
|
|
135
136
|
|
|
136
137
|
# These are equivalent:
|
|
137
138
|
response1 = client.get('/eims/views/output/stations')
|
|
138
|
-
response2 = client.get('https://
|
|
139
|
+
response2 = client.get('https://portal.hakai.org/api/eims/views/output/stations')
|
|
139
140
|
```
|
|
140
141
|
|
|
141
142
|
## Credentials Configuration
|
|
@@ -52,8 +52,8 @@ class Client(OAuth2Session):
|
|
|
52
52
|
>>> response = client.get("/custom/endpoint")
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
|
-
DEFAULT_API_ROOT = "https://
|
|
56
|
-
DEFAULT_LOGIN_PAGE = "https://
|
|
55
|
+
DEFAULT_API_ROOT = "https://portal.hakai.org/api"
|
|
56
|
+
DEFAULT_LOGIN_PAGE = "https://portal.hakai.org/api-client-login"
|
|
57
57
|
CREDENTIALS_ENV_VAR = "HAKAI_API_CREDENTIALS"
|
|
58
58
|
USER_AGENT_ENV_VAR = "HAKAI_API_USER_AGENT"
|
|
59
59
|
|
|
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
|