async-bakalari-api 0.2__tar.gz → 0.3.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 (31) hide show
  1. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/PKG-INFO +66 -37
  2. async_bakalari_api-0.3.1/README.md +70 -0
  3. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/pyproject.toml +18 -17
  4. async_bakalari_api-0.3.1/requirements.txt +34 -0
  5. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/async_bakalari_api.egg-info/PKG-INFO +66 -37
  6. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/async_bakalari_api.egg-info/SOURCES.txt +6 -1
  7. async_bakalari_api-0.3.1/src/async_bakalari_api.egg-info/requires.txt +12 -0
  8. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/bakalari.py +95 -37
  9. async_bakalari_api-0.3.1/src/bakalari_api/bakalari_demo.py +284 -0
  10. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/const.py +6 -1
  11. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/datastructure.py +77 -17
  12. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/komens.py +67 -35
  13. async_bakalari_api-0.3.1/tests/test_bakalari.py +584 -0
  14. async_bakalari_api-0.3.1/tests/test_const.py +13 -0
  15. async_bakalari_api-0.3.1/tests/test_datastructure.py +258 -0
  16. async_bakalari_api-0.3.1/tests/test_komens.py +221 -0
  17. async_bakalari_api-0.2/README.md +0 -45
  18. async_bakalari_api-0.2/src/async_bakalari_api.egg-info/requires.txt +0 -8
  19. async_bakalari_api-0.2/src/bakalari_api/bakalari_demo.py +0 -53
  20. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/LICENSE.md +0 -0
  21. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/setup.cfg +0 -0
  22. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/__init__.py +0 -0
  23. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/async_bakalari_api.egg-info/dependency_links.txt +0 -0
  24. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/async_bakalari_api.egg-info/entry_points.txt +0 -0
  25. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/async_bakalari_api.egg-info/not-zip-safe +0 -0
  26. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/async_bakalari_api.egg-info/top_level.txt +0 -0
  27. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/__init__.py +0 -0
  28. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/__main__.py +0 -0
  29. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/exceptions.py +0 -0
  30. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/first_login.py +0 -0
  31. {async_bakalari_api-0.2 → async_bakalari_api-0.3.1}/src/bakalari_api/logger_api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: async_bakalari_api
3
- Version: 0.2
3
+ Version: 0.3.1
4
4
  Summary: Async API for Bakalari endpoint v3
5
5
  Author-email: "Lukas Svoboda (@schizza)" <opensource@schizza.cz>
6
6
  Maintainer-email: Lukas Svoboda <opensource@schizza.cz>
@@ -208,7 +208,7 @@ License:
208
208
  limitations under the License.
209
209
 
210
210
  Project-URL: Homepage, https://github.com/schizza/bakalari-api3
211
- Project-URL: Documentation, https://github.com/schizza/bakalari-api3
211
+ Project-URL: Documentation, https://async-bakalari-api.schizza.cz
212
212
  Project-URL: Repository, https://github.com/schizza/bakalari-api3
213
213
  Project-URL: Bug Tracker, https://github.com/schizza/bakalari-api3/issues
214
214
  Project-URL: Changelog, https://github.com/schizza/bakalari-api3/blob/master/CHANGELOG.md
@@ -219,57 +219,86 @@ Classifier: Programming Language :: Python
219
219
  Requires-Python: >=3.12
220
220
  Description-Content-Type: text/markdown
221
221
  License-File: LICENSE.md
222
- Requires-Dist: asyncio
223
- Requires-Dist: typing
224
- Requires-Dist: aiohttp
225
- Requires-Dist: orjson
226
- Requires-Dist: async_timeout
227
- Requires-Dist: logger
228
- Requires-Dist: strenum
229
- Requires-Dist: pytest
222
+ Requires-Dist: aiohttp==3.9.5
223
+ Requires-Dist: aiosignal==1.3.1
224
+ Requires-Dist: attrs==23.2.0
225
+ Requires-Dist: frozenlist==1.4.1
226
+ Requires-Dist: idna==3.7
227
+ Requires-Dist: logger==1.4
228
+ Requires-Dist: multidict==6.0.5
229
+ Requires-Dist: orjson==3.10.3
230
+ Requires-Dist: python-dateutil==2.9.0.post0
231
+ Requires-Dist: six==1.16.0
232
+ Requires-Dist: strenum==0.4.15
233
+ Requires-Dist: yarl==1.9.4
230
234
 
231
235
  [![codecov](https://codecov.io/gh/schizza/async-bakalari-api3/graph/badge.svg?token=KC2WYAOLOP)](https://codecov.io/gh/schizza/async-bakalari-api3)
232
236
 
233
- # Python async client for Bakalari API v3
237
+ # Changelog
234
238
 
235
- ### 0.0.2
239
+ All notable changes to this project will be documented in this file.
236
240
 
237
- ## Added
241
+ 🇨🇿 Full documentation (czech) on [this site](https://async-bakalari-api.schizza.cz)
238
242
 
239
- * better exceptions handling and logging
240
- * class Komens
241
- * count unread messages
242
- * get all messages
243
+ ## [0.3]
243
244
 
244
- * tests and coverage
245
+ ### Added
245
246
 
246
- ## Changed
247
+ - `bakalari_demo.py` is now CLI application
248
+ - `Komens` now support for downloading attachment - `get_attachment`
249
+ - `send_auth_request` now supports extending EndPoints url wiht `extend` argument
250
+ - `school_list` now supports variable `town` - fetch schools in the town to limit downloading full list of schools.
251
+ - `Messages` class now have function `json` to return messages as JSON representative
252
+ - `Messages` class have `__str__` function for better handling `str(Messages)`
247
253
 
248
- * async_schools_list moved to Bakalari class
249
- * Refactor login functions
250
- * Refactor token handling
254
+ ### Changed
251
255
 
252
- ## Fixed
256
+ - refactor of the code for speed and better reading of the code
257
+ - `school_list` now fetching schools in concurency mode - improved speed form about 1:30 min to 20s
258
+ - `mid` variable in the `MessageContainter` is now string instead of integer.
259
+ - `async_school_list` renamed to `school_list` as all methods are async
260
+ - `MessageContainter` returns JSON bytes on `as_json()` call instead of `orjson.Fragment`
261
+ - `get_messsages()` renamed to `fetch_messages()`
253
262
 
254
- * Invalid refresh token
255
- * Refactor send_request to better maintenance
263
+ ### Removed
256
264
 
257
- ### v0.1
265
+ - `username` from `Credentials` - as we do not need to store it
258
266
 
259
- ## Class School from `datastructure.py`
267
+ ## [0.2]
260
268
 
261
- Now supports to download list of schools with their API points.
269
+ ### Added
262
270
 
263
- * get_url by school name or index in list
264
- * search school by town
265
- * cache list of schools by saving and loading list in JSON format
271
+ - better exceptions handling and logging
272
+ - `class Komens`
273
+ - count unread messages
274
+ - get all messages
275
+ - tests and coverage
266
276
 
267
- ## Class Bakalari
277
+ ### Changed
268
278
 
269
- * first login with username and password and stores access and refresh token
270
- * automaticaly refreshes access token with refresh token if refresh token is not expired
271
- * save access and refresh token localy to be cached
279
+ - `async_schools_list` moved to `Bakalari` class
280
+ - Refactor login functions
281
+ - Refactor token handling
272
282
 
273
- ## Class Komens
283
+ ### Fixed
274
284
 
275
- * count unread messages `count_unread_messages`
285
+ - Invalid refresh token
286
+ - Refactor send_request to better maintenance
287
+
288
+ ## [0.0.1]
289
+
290
+ ### Added
291
+
292
+ - main `class Bakalari`
293
+
294
+ - supports saving `access token` and `refresh token` localy
295
+ - automatically refreshes access token with refresh token if refresh token is not expired
296
+
297
+ - `class Schools` in `datastructures.py` lists all schools with their API points
298
+
299
+ - get_url by school name or index in list
300
+ - search school by town
301
+ - cache list of schools by saving and loading list in JSON format
302
+
303
+ [unreleased]: https://github.com/schizza/bakalari-api3/compare/v0.0.1...HEAD
304
+ [0.0.1]: https://github.com/schizza/bakalari-api3/releases/tag/v0.0.1
@@ -0,0 +1,70 @@
1
+ [![codecov](https://codecov.io/gh/schizza/async-bakalari-api3/graph/badge.svg?token=KC2WYAOLOP)](https://codecov.io/gh/schizza/async-bakalari-api3)
2
+
3
+ # Changelog
4
+
5
+ All notable changes to this project will be documented in this file.
6
+
7
+ 🇨🇿 Full documentation (czech) on [this site](https://async-bakalari-api.schizza.cz)
8
+
9
+ ## [0.3]
10
+
11
+ ### Added
12
+
13
+ - `bakalari_demo.py` is now CLI application
14
+ - `Komens` now support for downloading attachment - `get_attachment`
15
+ - `send_auth_request` now supports extending EndPoints url wiht `extend` argument
16
+ - `school_list` now supports variable `town` - fetch schools in the town to limit downloading full list of schools.
17
+ - `Messages` class now have function `json` to return messages as JSON representative
18
+ - `Messages` class have `__str__` function for better handling `str(Messages)`
19
+
20
+ ### Changed
21
+
22
+ - refactor of the code for speed and better reading of the code
23
+ - `school_list` now fetching schools in concurency mode - improved speed form about 1:30 min to 20s
24
+ - `mid` variable in the `MessageContainter` is now string instead of integer.
25
+ - `async_school_list` renamed to `school_list` as all methods are async
26
+ - `MessageContainter` returns JSON bytes on `as_json()` call instead of `orjson.Fragment`
27
+ - `get_messsages()` renamed to `fetch_messages()`
28
+
29
+ ### Removed
30
+
31
+ - `username` from `Credentials` - as we do not need to store it
32
+
33
+ ## [0.2]
34
+
35
+ ### Added
36
+
37
+ - better exceptions handling and logging
38
+ - `class Komens`
39
+ - count unread messages
40
+ - get all messages
41
+ - tests and coverage
42
+
43
+ ### Changed
44
+
45
+ - `async_schools_list` moved to `Bakalari` class
46
+ - Refactor login functions
47
+ - Refactor token handling
48
+
49
+ ### Fixed
50
+
51
+ - Invalid refresh token
52
+ - Refactor send_request to better maintenance
53
+
54
+ ## [0.0.1]
55
+
56
+ ### Added
57
+
58
+ - main `class Bakalari`
59
+
60
+ - supports saving `access token` and `refresh token` localy
61
+ - automatically refreshes access token with refresh token if refresh token is not expired
62
+
63
+ - `class Schools` in `datastructures.py` lists all schools with their API points
64
+
65
+ - get_url by school name or index in list
66
+ - search school by town
67
+ - cache list of schools by saving and loading list in JSON format
68
+
69
+ [unreleased]: https://github.com/schizza/bakalari-api3/compare/v0.0.1...HEAD
70
+ [0.0.1]: https://github.com/schizza/bakalari-api3/releases/tag/v0.0.1
@@ -4,17 +4,9 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "async_bakalari_api"
7
- version = "0.2"
8
- dependencies = [
9
- "asyncio",
10
- "typing",
11
- "aiohttp",
12
- "orjson",
13
- "async_timeout",
14
- "logger",
15
- "strenum",
16
- "pytest",
17
- ]
7
+ version = "0.3.1"
8
+ dynamic = ["dependencies"]
9
+
18
10
 
19
11
  requires-python = ">=3.12"
20
12
  authors = [
@@ -33,9 +25,17 @@ classifiers = [
33
25
  "Programming Language :: Python"
34
26
  ]
35
27
 
28
+ [tool.setuptools.dynamic]
29
+ dependencies = { file = ["requirements.txt"] }
30
+
31
+ [tool.setuptools]
32
+ platforms = ["any"]
33
+ zip-safe = false
34
+ include-package-data = true
35
+
36
36
  [project.urls]
37
37
  Homepage = "https://github.com/schizza/bakalari-api3"
38
- Documentation = "https://github.com/schizza/bakalari-api3"
38
+ Documentation = "https://async-bakalari-api.schizza.cz"
39
39
  Repository = "https://github.com/schizza/bakalari-api3"
40
40
  "Bug Tracker" = "https://github.com/schizza/bakalari-api3/issues"
41
41
  Changelog = "https://github.com/schizza/bakalari-api3/blob/master/CHANGELOG.md"
@@ -43,17 +43,18 @@ Changelog = "https://github.com/schizza/bakalari-api3/blob/master/CHANGELOG.md"
43
43
  [project.scripts]
44
44
  bakalari = "bakalari_api:main"
45
45
 
46
- [tool.setuptools]
47
- platforms = ["any"]
48
- zip-safe = false
49
- include-package-data = true
50
-
51
46
  [tool.pylint.MAIN]
52
47
  py-version = "3.12"
53
48
  ignore = [
54
49
  "tests"
55
50
  ]
56
51
 
52
+ [tool.coverage.run]
53
+ omit = [
54
+ "tests/*",
55
+ "src/bakalari_api/bakalari_demo.py"
56
+ ]
57
+
57
58
  [tool.pytest.ini_options]
58
59
  asyncio_mode = "auto"
59
60
  testpaths = [
@@ -0,0 +1,34 @@
1
+ #
2
+ # This file is autogenerated by pip-compile with Python 3.12
3
+ # by the following command:
4
+ #
5
+ # pip-compile
6
+ #
7
+ aiohttp==3.9.5
8
+ # via -r requirements.in
9
+ aiosignal==1.3.1
10
+ # via aiohttp
11
+ attrs==23.2.0
12
+ # via aiohttp
13
+ frozenlist==1.4.1
14
+ # via
15
+ # aiohttp
16
+ # aiosignal
17
+ idna==3.7
18
+ # via yarl
19
+ logger==1.4
20
+ # via -r requirements.in
21
+ multidict==6.0.5
22
+ # via
23
+ # aiohttp
24
+ # yarl
25
+ orjson==3.10.3
26
+ # via -r requirements.in
27
+ python-dateutil==2.9.0.post0
28
+ # via -r requirements.in
29
+ six==1.16.0
30
+ # via python-dateutil
31
+ strenum==0.4.15
32
+ # via -r requirements.in
33
+ yarl==1.9.4
34
+ # via aiohttp
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: async_bakalari_api
3
- Version: 0.2
3
+ Version: 0.3.1
4
4
  Summary: Async API for Bakalari endpoint v3
5
5
  Author-email: "Lukas Svoboda (@schizza)" <opensource@schizza.cz>
6
6
  Maintainer-email: Lukas Svoboda <opensource@schizza.cz>
@@ -208,7 +208,7 @@ License:
208
208
  limitations under the License.
209
209
 
210
210
  Project-URL: Homepage, https://github.com/schizza/bakalari-api3
211
- Project-URL: Documentation, https://github.com/schizza/bakalari-api3
211
+ Project-URL: Documentation, https://async-bakalari-api.schizza.cz
212
212
  Project-URL: Repository, https://github.com/schizza/bakalari-api3
213
213
  Project-URL: Bug Tracker, https://github.com/schizza/bakalari-api3/issues
214
214
  Project-URL: Changelog, https://github.com/schizza/bakalari-api3/blob/master/CHANGELOG.md
@@ -219,57 +219,86 @@ Classifier: Programming Language :: Python
219
219
  Requires-Python: >=3.12
220
220
  Description-Content-Type: text/markdown
221
221
  License-File: LICENSE.md
222
- Requires-Dist: asyncio
223
- Requires-Dist: typing
224
- Requires-Dist: aiohttp
225
- Requires-Dist: orjson
226
- Requires-Dist: async_timeout
227
- Requires-Dist: logger
228
- Requires-Dist: strenum
229
- Requires-Dist: pytest
222
+ Requires-Dist: aiohttp==3.9.5
223
+ Requires-Dist: aiosignal==1.3.1
224
+ Requires-Dist: attrs==23.2.0
225
+ Requires-Dist: frozenlist==1.4.1
226
+ Requires-Dist: idna==3.7
227
+ Requires-Dist: logger==1.4
228
+ Requires-Dist: multidict==6.0.5
229
+ Requires-Dist: orjson==3.10.3
230
+ Requires-Dist: python-dateutil==2.9.0.post0
231
+ Requires-Dist: six==1.16.0
232
+ Requires-Dist: strenum==0.4.15
233
+ Requires-Dist: yarl==1.9.4
230
234
 
231
235
  [![codecov](https://codecov.io/gh/schizza/async-bakalari-api3/graph/badge.svg?token=KC2WYAOLOP)](https://codecov.io/gh/schizza/async-bakalari-api3)
232
236
 
233
- # Python async client for Bakalari API v3
237
+ # Changelog
234
238
 
235
- ### 0.0.2
239
+ All notable changes to this project will be documented in this file.
236
240
 
237
- ## Added
241
+ 🇨🇿 Full documentation (czech) on [this site](https://async-bakalari-api.schizza.cz)
238
242
 
239
- * better exceptions handling and logging
240
- * class Komens
241
- * count unread messages
242
- * get all messages
243
+ ## [0.3]
243
244
 
244
- * tests and coverage
245
+ ### Added
245
246
 
246
- ## Changed
247
+ - `bakalari_demo.py` is now CLI application
248
+ - `Komens` now support for downloading attachment - `get_attachment`
249
+ - `send_auth_request` now supports extending EndPoints url wiht `extend` argument
250
+ - `school_list` now supports variable `town` - fetch schools in the town to limit downloading full list of schools.
251
+ - `Messages` class now have function `json` to return messages as JSON representative
252
+ - `Messages` class have `__str__` function for better handling `str(Messages)`
247
253
 
248
- * async_schools_list moved to Bakalari class
249
- * Refactor login functions
250
- * Refactor token handling
254
+ ### Changed
251
255
 
252
- ## Fixed
256
+ - refactor of the code for speed and better reading of the code
257
+ - `school_list` now fetching schools in concurency mode - improved speed form about 1:30 min to 20s
258
+ - `mid` variable in the `MessageContainter` is now string instead of integer.
259
+ - `async_school_list` renamed to `school_list` as all methods are async
260
+ - `MessageContainter` returns JSON bytes on `as_json()` call instead of `orjson.Fragment`
261
+ - `get_messsages()` renamed to `fetch_messages()`
253
262
 
254
- * Invalid refresh token
255
- * Refactor send_request to better maintenance
263
+ ### Removed
256
264
 
257
- ### v0.1
265
+ - `username` from `Credentials` - as we do not need to store it
258
266
 
259
- ## Class School from `datastructure.py`
267
+ ## [0.2]
260
268
 
261
- Now supports to download list of schools with their API points.
269
+ ### Added
262
270
 
263
- * get_url by school name or index in list
264
- * search school by town
265
- * cache list of schools by saving and loading list in JSON format
271
+ - better exceptions handling and logging
272
+ - `class Komens`
273
+ - count unread messages
274
+ - get all messages
275
+ - tests and coverage
266
276
 
267
- ## Class Bakalari
277
+ ### Changed
268
278
 
269
- * first login with username and password and stores access and refresh token
270
- * automaticaly refreshes access token with refresh token if refresh token is not expired
271
- * save access and refresh token localy to be cached
279
+ - `async_schools_list` moved to `Bakalari` class
280
+ - Refactor login functions
281
+ - Refactor token handling
272
282
 
273
- ## Class Komens
283
+ ### Fixed
274
284
 
275
- * count unread messages `count_unread_messages`
285
+ - Invalid refresh token
286
+ - Refactor send_request to better maintenance
287
+
288
+ ## [0.0.1]
289
+
290
+ ### Added
291
+
292
+ - main `class Bakalari`
293
+
294
+ - supports saving `access token` and `refresh token` localy
295
+ - automatically refreshes access token with refresh token if refresh token is not expired
296
+
297
+ - `class Schools` in `datastructures.py` lists all schools with their API points
298
+
299
+ - get_url by school name or index in list
300
+ - search school by town
301
+ - cache list of schools by saving and loading list in JSON format
302
+
303
+ [unreleased]: https://github.com/schizza/bakalari-api3/compare/v0.0.1...HEAD
304
+ [0.0.1]: https://github.com/schizza/bakalari-api3/releases/tag/v0.0.1
@@ -1,6 +1,7 @@
1
1
  LICENSE.md
2
2
  README.md
3
3
  pyproject.toml
4
+ requirements.txt
4
5
  src/__init__.py
5
6
  src/async_bakalari_api.egg-info/PKG-INFO
6
7
  src/async_bakalari_api.egg-info/SOURCES.txt
@@ -18,4 +19,8 @@ src/bakalari_api/datastructure.py
18
19
  src/bakalari_api/exceptions.py
19
20
  src/bakalari_api/first_login.py
20
21
  src/bakalari_api/komens.py
21
- src/bakalari_api/logger_api.py
22
+ src/bakalari_api/logger_api.py
23
+ tests/test_bakalari.py
24
+ tests/test_const.py
25
+ tests/test_datastructure.py
26
+ tests/test_komens.py
@@ -0,0 +1,12 @@
1
+ aiohttp==3.9.5
2
+ aiosignal==1.3.1
3
+ attrs==23.2.0
4
+ frozenlist==1.4.1
5
+ idna==3.7
6
+ logger==1.4
7
+ multidict==6.0.5
8
+ orjson==3.10.3
9
+ python-dateutil==2.9.0.post0
10
+ six==1.16.0
11
+ strenum==0.4.15
12
+ yarl==1.9.4