repeaterbook 0.1.0__tar.gz → 0.1.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.
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/PKG-INFO +1 -1
- repeaterbook-0.1.1/docs/CHANGELOG.md +28 -0
- repeaterbook-0.1.1/playground/.gitignore +3 -0
- repeaterbook-0.1.1/playground/examples.ipynb +63 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/pyproject.toml +1 -1
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/src/repeaterbook/models.py +2 -2
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/src/repeaterbook/services.py +4 -4
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/src/repeaterbook/utils.py +2 -2
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/uv.lock +1 -1
- repeaterbook-0.1.0/docs/CHANGELOG.md +0 -12
- repeaterbook-0.1.0/playground/.gitignore +0 -2
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.all-contributorsrc +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.cruft.json +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.editorconfig +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.github/workflows/ci.yml +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.github/workflows/codecov_action.yml +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.github/workflows/semantic-release.yml +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.gitignore +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.pre-commit-config.yaml +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.python-version +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.python-versions +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/.readthedocs.yaml +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/LICENSE +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/asv.conf.json +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/benchmarks/__init__.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/benchmarks/benchmarks.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/CODE_OF_CONDUCT.md +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/CONTRIBUTING.md +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/Makefile +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/README.md +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/__init__.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/_static/.gitignore +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/_templates/.gitignore +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/conf.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/index.rst +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/make.bat +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/reference.md +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/docs/wordlist.txt +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/noxfile.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/src/repeaterbook/__init__.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/src/repeaterbook/py.typed +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/tests/__init__.py +0 -0
- {repeaterbook-0.1.0 → repeaterbook-0.1.1}/tests/test_repeaterbook.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: repeaterbook
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Python utility to work with data from RepeaterBook.
|
|
5
5
|
Project-URL: homepage, https://github.com/MicaelJarniac/repeaterbook
|
|
6
6
|
Project-URL: source, https://github.com/MicaelJarniac/repeaterbook
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## v0.1.1 (2025-04-03)
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
- Merge instead of add to local DB
|
|
9
|
+
([`f6dfcbf`](https://github.com/MicaelJarniac/repeaterbook/commit/f6dfcbf242c9af07578d5a2e8e19047ee2db96b9))
|
|
10
|
+
|
|
11
|
+
### Chores
|
|
12
|
+
|
|
13
|
+
- Dunder all as tuples
|
|
14
|
+
([`2dfb808`](https://github.com/MicaelJarniac/repeaterbook/commit/2dfb8089fee6db5fc26b9d3ea986fe8f9ce86cd3))
|
|
15
|
+
|
|
16
|
+
- Simpler working dir default
|
|
17
|
+
([`fecdd43`](https://github.com/MicaelJarniac/repeaterbook/commit/fecdd4353fb37f46d42de3b6da69d7d402b76742))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## v0.1.0 (2025-03-31)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- Initial release
|
|
25
|
+
([`2a257dd`](https://github.com/MicaelJarniac/repeaterbook/commit/2a257ddaada98ffa6871e607a868aabf6556bae1))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## v0.0.0 (2025-03-21)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": null,
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"outputs": [],
|
|
8
|
+
"source": [
|
|
9
|
+
"import pycountry\n",
|
|
10
|
+
"from anyio import Path\n",
|
|
11
|
+
"\n",
|
|
12
|
+
"from repeaterbook.models import ExportQuery\n",
|
|
13
|
+
"from repeaterbook.services import RepeaterBook\n",
|
|
14
|
+
"\n",
|
|
15
|
+
"rb = RepeaterBook(\n",
|
|
16
|
+
" app_name=\"RepeaterBook Python SDK\",\n",
|
|
17
|
+
" app_email=\"micael@jarniac.dev\",\n",
|
|
18
|
+
" working_dir=Path(),\n",
|
|
19
|
+
")\n",
|
|
20
|
+
"await rb.download(query=ExportQuery(countries={pycountry.countries.get(name=\"Brazil\")}))"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"cell_type": "code",
|
|
25
|
+
"execution_count": null,
|
|
26
|
+
"metadata": {},
|
|
27
|
+
"outputs": [],
|
|
28
|
+
"source": [
|
|
29
|
+
"from haversine import Unit\n",
|
|
30
|
+
"from rich import print as pprint\n",
|
|
31
|
+
"\n",
|
|
32
|
+
"repeaters = rb.find_nearest(\n",
|
|
33
|
+
" latitude=-22.4000,\n",
|
|
34
|
+
" longitude=-46.9000,\n",
|
|
35
|
+
" max_distance=50,\n",
|
|
36
|
+
" unit=Unit.KILOMETERS,\n",
|
|
37
|
+
")\n",
|
|
38
|
+
"pprint(repeaters)"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"metadata": {
|
|
43
|
+
"kernelspec": {
|
|
44
|
+
"display_name": ".venv",
|
|
45
|
+
"language": "python",
|
|
46
|
+
"name": "python3"
|
|
47
|
+
},
|
|
48
|
+
"language_info": {
|
|
49
|
+
"codemirror_mode": {
|
|
50
|
+
"name": "ipython",
|
|
51
|
+
"version": 3
|
|
52
|
+
},
|
|
53
|
+
"file_extension": ".py",
|
|
54
|
+
"mimetype": "text/x-python",
|
|
55
|
+
"name": "python",
|
|
56
|
+
"nbconvert_exporter": "python",
|
|
57
|
+
"pygments_lexer": "ipython3",
|
|
58
|
+
"version": "3.13.2"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"nbformat": 4,
|
|
62
|
+
"nbformat_minor": 2
|
|
63
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
__all__:
|
|
6
|
+
__all__: tuple[str, ...] = (
|
|
7
7
|
"Emergency",
|
|
8
8
|
"EmergencyJSON",
|
|
9
9
|
"ErrorJSON",
|
|
@@ -25,7 +25,7 @@ __all__: list[str] = [
|
|
|
25
25
|
"UseJSON",
|
|
26
26
|
"YesNoJSON",
|
|
27
27
|
"ZeroOneJSON",
|
|
28
|
-
|
|
28
|
+
)
|
|
29
29
|
|
|
30
30
|
from datetime import date
|
|
31
31
|
from decimal import Decimal
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
__all__:
|
|
5
|
+
__all__: tuple[str, ...] = (
|
|
6
6
|
"BOOL_MAP",
|
|
7
7
|
"STATUS_MAP",
|
|
8
8
|
"USE_MAP",
|
|
9
9
|
"RepeaterBook",
|
|
10
10
|
"fetch_json",
|
|
11
11
|
"json_to_model",
|
|
12
|
-
|
|
12
|
+
)
|
|
13
13
|
|
|
14
14
|
import asyncio
|
|
15
15
|
import hashlib
|
|
@@ -185,7 +185,7 @@ class RepeaterBook:
|
|
|
185
185
|
app_name: str = "RepeaterBook Python SDK"
|
|
186
186
|
app_email: str = "micael@jarniac.dev"
|
|
187
187
|
|
|
188
|
-
working_dir: Path = attrs.Factory(
|
|
188
|
+
working_dir: Path = attrs.Factory(Path)
|
|
189
189
|
database: str = "repeaterbook.db"
|
|
190
190
|
|
|
191
191
|
MAX_COUNT: ClassVar[int] = 3500
|
|
@@ -340,7 +340,7 @@ class RepeaterBook:
|
|
|
340
340
|
with Session(self.engine) as session:
|
|
341
341
|
for result in results:
|
|
342
342
|
repeater = json_to_model(result)
|
|
343
|
-
session.
|
|
343
|
+
session.merge(repeater)
|
|
344
344
|
repeaters.append(repeater)
|
|
345
345
|
session.commit()
|
|
346
346
|
|
|
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
|
|
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
|