crawlora-sofascore 0.1.1__tar.gz → 0.1.3__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.
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/PKG-INFO +44 -7
- crawlora_sofascore-0.1.3/README.md +75 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/__init__.py +1 -1
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/platform.py +2 -2
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/PKG-INFO +44 -7
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/pyproject.toml +1 -1
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/tests/test_package.py +1 -1
- crawlora_sofascore-0.1.1/README.md +0 -38
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/LICENSE +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/__init__.pyi +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/_pagination.py +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/_transport_sync.py +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/async_client.py +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/client.py +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/operations.py +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/platform.pyi +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore/py.typed +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/SOURCES.txt +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/dependency_links.txt +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/requires.txt +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/top_level.txt +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/setup.cfg +0 -0
- {crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/tests/test_types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crawlora-sofascore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Typed SofaScore client for the Crawlora hosted API
|
|
5
5
|
Author: Crawlora
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,9 +23,9 @@ Dynamic: license-file
|
|
|
23
23
|
# crawlora-sofascore
|
|
24
24
|
|
|
25
25
|
Python client for Crawlora's hosted SofaScore API. It calls Crawlora's
|
|
26
|
-
service; it does not run a browser or scrape
|
|
27
|
-
account and `CRAWLORA_API_KEY` are required,
|
|
28
|
-
Crawlora account. Crawlora is independent from and not endorsed by
|
|
26
|
+
service at [Crawlora](https://crawlora.net); it does not run a browser or scrape
|
|
27
|
+
SofaScore locally. A Crawlora account and `CRAWLORA_API_KEY` are required,
|
|
28
|
+
and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by
|
|
29
29
|
SofaScore or its owners.
|
|
30
30
|
|
|
31
31
|
## Install
|
|
@@ -34,16 +34,32 @@ SofaScore or its owners.
|
|
|
34
34
|
python -m pip install crawlora-sofascore
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
## Get an API key
|
|
38
|
+
|
|
39
|
+
Create an account at [crawlora.net](https://crawlora.net/signup), then open the [Crawlora console](https://crawlora.net/app) for API-key setup. Set your key in the shell before running the client:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
export CRAWLORA_API_KEY="your-crawlora-api-key"
|
|
43
|
+
```
|
|
44
|
+
|
|
37
45
|
## Use
|
|
38
46
|
|
|
47
|
+
Save this example as `example.py`, then run `python example.py` after installing the package and setting your API key.
|
|
48
|
+
|
|
39
49
|
```python
|
|
40
50
|
import os
|
|
41
51
|
|
|
42
52
|
from crawlora_sofascore import SofascoreClient
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
api_key = os.environ.get("CRAWLORA_API_KEY")
|
|
55
|
+
if not api_key:
|
|
56
|
+
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
|
|
57
|
+
|
|
58
|
+
with SofascoreClient(api_key=api_key) as client:
|
|
59
|
+
result_1 = client.search(q='Liverpool')
|
|
60
|
+
print(result_1)
|
|
61
|
+
result_2 = client.live_events(sport='football')
|
|
62
|
+
print(result_2)
|
|
47
63
|
```
|
|
48
64
|
|
|
49
65
|
The package also exports `Client` as an alias for `SofascoreClient`. Operation
|
|
@@ -51,6 +67,27 @@ methods are available directly in snake_case and through the `sofascore`
|
|
|
51
67
|
group. The async package client is `AsyncSofascoreClient`; see the [online
|
|
52
68
|
endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) and [runnable example](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/examples/python.py).
|
|
53
69
|
|
|
70
|
+
### Async usage
|
|
71
|
+
|
|
72
|
+
The package also exports `AsyncClient` for asynchronous requests:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import asyncio
|
|
76
|
+
import os
|
|
77
|
+
|
|
78
|
+
from crawlora_sofascore import AsyncClient
|
|
79
|
+
|
|
80
|
+
async def main():
|
|
81
|
+
api_key = os.environ.get("CRAWLORA_API_KEY")
|
|
82
|
+
if not api_key:
|
|
83
|
+
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
|
|
84
|
+
async with AsyncClient(api_key=api_key) as client:
|
|
85
|
+
result_1 = await client.search(q='Liverpool')
|
|
86
|
+
print(result_1)
|
|
87
|
+
|
|
88
|
+
asyncio.run(main())
|
|
89
|
+
```
|
|
90
|
+
|
|
54
91
|
The import snippet above is for a project where this PyPI package is installed. To run the checked-in example from a source checkout, install `./python` from the repository root and run `python examples/python.py`; see the [source-checkout instructions](https://github.com/Crawlora-org/crawlora-sofascore#run-examples-from-a-source-checkout).
|
|
55
92
|
|
|
56
93
|
## Configuration
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# crawlora-sofascore
|
|
2
|
+
|
|
3
|
+
Python client for Crawlora's hosted SofaScore API. It calls Crawlora's
|
|
4
|
+
service at [Crawlora](https://crawlora.net); it does not run a browser or scrape
|
|
5
|
+
SofaScore locally. A Crawlora account and `CRAWLORA_API_KEY` are required,
|
|
6
|
+
and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by
|
|
7
|
+
SofaScore or its owners.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
python -m pip install crawlora-sofascore
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Get an API key
|
|
16
|
+
|
|
17
|
+
Create an account at [crawlora.net](https://crawlora.net/signup), then open the [Crawlora console](https://crawlora.net/app) for API-key setup. Set your key in the shell before running the client:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
export CRAWLORA_API_KEY="your-crawlora-api-key"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Use
|
|
24
|
+
|
|
25
|
+
Save this example as `example.py`, then run `python example.py` after installing the package and setting your API key.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import os
|
|
29
|
+
|
|
30
|
+
from crawlora_sofascore import SofascoreClient
|
|
31
|
+
|
|
32
|
+
api_key = os.environ.get("CRAWLORA_API_KEY")
|
|
33
|
+
if not api_key:
|
|
34
|
+
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
|
|
35
|
+
|
|
36
|
+
with SofascoreClient(api_key=api_key) as client:
|
|
37
|
+
result_1 = client.search(q='Liverpool')
|
|
38
|
+
print(result_1)
|
|
39
|
+
result_2 = client.live_events(sport='football')
|
|
40
|
+
print(result_2)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The package also exports `Client` as an alias for `SofascoreClient`. Operation
|
|
44
|
+
methods are available directly in snake_case and through the `sofascore`
|
|
45
|
+
group. The async package client is `AsyncSofascoreClient`; see the [online
|
|
46
|
+
endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) and [runnable example](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/examples/python.py).
|
|
47
|
+
|
|
48
|
+
### Async usage
|
|
49
|
+
|
|
50
|
+
The package also exports `AsyncClient` for asynchronous requests:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import asyncio
|
|
54
|
+
import os
|
|
55
|
+
|
|
56
|
+
from crawlora_sofascore import AsyncClient
|
|
57
|
+
|
|
58
|
+
async def main():
|
|
59
|
+
api_key = os.environ.get("CRAWLORA_API_KEY")
|
|
60
|
+
if not api_key:
|
|
61
|
+
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
|
|
62
|
+
async with AsyncClient(api_key=api_key) as client:
|
|
63
|
+
result_1 = await client.search(q='Liverpool')
|
|
64
|
+
print(result_1)
|
|
65
|
+
|
|
66
|
+
asyncio.run(main())
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The import snippet above is for a project where this PyPI package is installed. To run the checked-in example from a source checkout, install `./python` from the repository root and run `python examples/python.py`; see the [source-checkout instructions](https://github.com/Crawlora-org/crawlora-sofascore#run-examples-from-a-source-checkout).
|
|
70
|
+
|
|
71
|
+
## Configuration
|
|
72
|
+
|
|
73
|
+
Pass your key through `api_key` or read `CRAWLORA_API_KEY` from the environment.
|
|
74
|
+
Keep credentials out of source control and logs. Requests go to Crawlora's
|
|
75
|
+
hosted API, and response data and availability follow its current contract.
|
|
@@ -6,7 +6,7 @@ from .operations import OPERATION_COUNT, OPERATION_IDS, PLATFORM
|
|
|
6
6
|
|
|
7
7
|
Client = SofascoreClient
|
|
8
8
|
AsyncClient = AsyncSofascoreClient
|
|
9
|
-
__version__ = '0.1.
|
|
9
|
+
__version__ = '0.1.3'
|
|
10
10
|
DISPLAY_NAME = 'SofaScore'
|
|
11
11
|
PLATFORM = 'sofascore'
|
|
12
12
|
CONTRACT_REVISION = 'sha256:8dc2e500465b7b7f98054def2f9794e0e433d8bbbcba6cfb688e0b6ed0ecbfcd'
|
|
@@ -7,7 +7,7 @@ from .async_client import AsyncCrawloraClient
|
|
|
7
7
|
class SofascoreClient(CrawloraClient):
|
|
8
8
|
"""Synchronous SofaScore API client."""
|
|
9
9
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
10
|
-
kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.1.
|
|
10
|
+
kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.1.3')
|
|
11
11
|
super().__init__(*args, **kwargs)
|
|
12
12
|
|
|
13
13
|
def event(self, **params: Any) -> Any:
|
|
@@ -103,7 +103,7 @@ class SofascoreClient(CrawloraClient):
|
|
|
103
103
|
class AsyncSofascoreClient(AsyncCrawloraClient):
|
|
104
104
|
"""Asynchronous SofaScore API client."""
|
|
105
105
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
106
|
-
kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.1.
|
|
106
|
+
kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.1.3')
|
|
107
107
|
super().__init__(*args, **kwargs)
|
|
108
108
|
|
|
109
109
|
async def event(self, **params: Any) -> Any:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crawlora-sofascore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Typed SofaScore client for the Crawlora hosted API
|
|
5
5
|
Author: Crawlora
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,9 +23,9 @@ Dynamic: license-file
|
|
|
23
23
|
# crawlora-sofascore
|
|
24
24
|
|
|
25
25
|
Python client for Crawlora's hosted SofaScore API. It calls Crawlora's
|
|
26
|
-
service; it does not run a browser or scrape
|
|
27
|
-
account and `CRAWLORA_API_KEY` are required,
|
|
28
|
-
Crawlora account. Crawlora is independent from and not endorsed by
|
|
26
|
+
service at [Crawlora](https://crawlora.net); it does not run a browser or scrape
|
|
27
|
+
SofaScore locally. A Crawlora account and `CRAWLORA_API_KEY` are required,
|
|
28
|
+
and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by
|
|
29
29
|
SofaScore or its owners.
|
|
30
30
|
|
|
31
31
|
## Install
|
|
@@ -34,16 +34,32 @@ SofaScore or its owners.
|
|
|
34
34
|
python -m pip install crawlora-sofascore
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
## Get an API key
|
|
38
|
+
|
|
39
|
+
Create an account at [crawlora.net](https://crawlora.net/signup), then open the [Crawlora console](https://crawlora.net/app) for API-key setup. Set your key in the shell before running the client:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
export CRAWLORA_API_KEY="your-crawlora-api-key"
|
|
43
|
+
```
|
|
44
|
+
|
|
37
45
|
## Use
|
|
38
46
|
|
|
47
|
+
Save this example as `example.py`, then run `python example.py` after installing the package and setting your API key.
|
|
48
|
+
|
|
39
49
|
```python
|
|
40
50
|
import os
|
|
41
51
|
|
|
42
52
|
from crawlora_sofascore import SofascoreClient
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
api_key = os.environ.get("CRAWLORA_API_KEY")
|
|
55
|
+
if not api_key:
|
|
56
|
+
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
|
|
57
|
+
|
|
58
|
+
with SofascoreClient(api_key=api_key) as client:
|
|
59
|
+
result_1 = client.search(q='Liverpool')
|
|
60
|
+
print(result_1)
|
|
61
|
+
result_2 = client.live_events(sport='football')
|
|
62
|
+
print(result_2)
|
|
47
63
|
```
|
|
48
64
|
|
|
49
65
|
The package also exports `Client` as an alias for `SofascoreClient`. Operation
|
|
@@ -51,6 +67,27 @@ methods are available directly in snake_case and through the `sofascore`
|
|
|
51
67
|
group. The async package client is `AsyncSofascoreClient`; see the [online
|
|
52
68
|
endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) and [runnable example](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/examples/python.py).
|
|
53
69
|
|
|
70
|
+
### Async usage
|
|
71
|
+
|
|
72
|
+
The package also exports `AsyncClient` for asynchronous requests:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import asyncio
|
|
76
|
+
import os
|
|
77
|
+
|
|
78
|
+
from crawlora_sofascore import AsyncClient
|
|
79
|
+
|
|
80
|
+
async def main():
|
|
81
|
+
api_key = os.environ.get("CRAWLORA_API_KEY")
|
|
82
|
+
if not api_key:
|
|
83
|
+
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
|
|
84
|
+
async with AsyncClient(api_key=api_key) as client:
|
|
85
|
+
result_1 = await client.search(q='Liverpool')
|
|
86
|
+
print(result_1)
|
|
87
|
+
|
|
88
|
+
asyncio.run(main())
|
|
89
|
+
```
|
|
90
|
+
|
|
54
91
|
The import snippet above is for a project where this PyPI package is installed. To run the checked-in example from a source checkout, install `./python` from the repository root and run `python examples/python.py`; see the [source-checkout instructions](https://github.com/Crawlora-org/crawlora-sofascore#run-examples-from-a-source-checkout).
|
|
55
92
|
|
|
56
93
|
## Configuration
|
|
@@ -28,7 +28,7 @@ class MockTransport:
|
|
|
28
28
|
class PackageTests(unittest.TestCase):
|
|
29
29
|
def test_platform_metadata_and_aliases(self):
|
|
30
30
|
self.assertEqual(client_package.PLATFORM, "sofascore")
|
|
31
|
-
self.assertEqual(client_package.__version__, "0.1.
|
|
31
|
+
self.assertEqual(client_package.__version__, "0.1.3")
|
|
32
32
|
self.assertIs(client_package.Client, client_package.SofascoreClient)
|
|
33
33
|
self.assertIs(client_package.AsyncClient, client_package.AsyncSofascoreClient)
|
|
34
34
|
self.assertEqual(client_package.OPERATION_COUNT, len(client_package.OPERATION_IDS))
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# crawlora-sofascore
|
|
2
|
-
|
|
3
|
-
Python client for Crawlora's hosted SofaScore API. It calls Crawlora's
|
|
4
|
-
service; it does not run a browser or scrape SofaScore locally. A Crawlora
|
|
5
|
-
account and `CRAWLORA_API_KEY` are required, and API use is billed under your
|
|
6
|
-
Crawlora account. Crawlora is independent from and not endorsed by
|
|
7
|
-
SofaScore or its owners.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
python -m pip install crawlora-sofascore
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Use
|
|
16
|
-
|
|
17
|
-
```python
|
|
18
|
-
import os
|
|
19
|
-
|
|
20
|
-
from crawlora_sofascore import SofascoreClient
|
|
21
|
-
|
|
22
|
-
with SofascoreClient(api_key=os.environ["CRAWLORA_API_KEY"]) as client:
|
|
23
|
-
result = client.search(q='Liverpool')
|
|
24
|
-
print(result)
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
The package also exports `Client` as an alias for `SofascoreClient`. Operation
|
|
28
|
-
methods are available directly in snake_case and through the `sofascore`
|
|
29
|
-
group. The async package client is `AsyncSofascoreClient`; see the [online
|
|
30
|
-
endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) and [runnable example](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/examples/python.py).
|
|
31
|
-
|
|
32
|
-
The import snippet above is for a project where this PyPI package is installed. To run the checked-in example from a source checkout, install `./python` from the repository root and run `python examples/python.py`; see the [source-checkout instructions](https://github.com/Crawlora-org/crawlora-sofascore#run-examples-from-a-source-checkout).
|
|
33
|
-
|
|
34
|
-
## Configuration
|
|
35
|
-
|
|
36
|
-
Pass your key through `api_key` or read `CRAWLORA_API_KEY` from the environment.
|
|
37
|
-
Keep credentials out of source control and logs. Requests go to Crawlora's
|
|
38
|
-
hosted API, and response data and availability follow its current contract.
|
|
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
|
{crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/requires.txt
RENAMED
|
File without changes
|
{crawlora_sofascore-0.1.1 → crawlora_sofascore-0.1.3}/crawlora_sofascore.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|