newsdataapi 0.2.1__tar.gz → 0.2.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.
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/PKG-INFO +22 -6
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/README.md +21 -5
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/src/newsdataapi/__init__.py +1 -1
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/src/newsdataapi/client.py +5 -5
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/.github/workflows/ci.yml +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/.github/workflows/publish.yml +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/.gitignore +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/.python-version +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/LICENSE +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/examples/basic_usage.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/newsdata-logo.png +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/pyproject.toml +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/src/newsdataapi/constants.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/src/newsdataapi/csv_export.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/src/newsdataapi/exceptions.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/src/newsdataapi/py.typed +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/tests/__init__.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/tests/conftest.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/tests/test_integration.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/tests/test_unit.py +0 -0
- {newsdataapi-0.2.1 → newsdataapi-0.2.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: newsdataapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Official Python client (SDK) for the Newsdata.io News API — fetch real-time, historical, crypto, and stock-market news via REST, with validation, retries, pagination, and typed exceptions.
|
|
5
5
|
Project-URL: Homepage, https://newsdata.io
|
|
6
6
|
Project-URL: Documentation, https://newsdata.io/documentation
|
|
@@ -51,15 +51,16 @@ Description-Content-Type: text/markdown
|
|
|
51
51
|
|
|
52
52
|
<div align="center">
|
|
53
53
|
|
|
54
|
-
[](https://newsdata.io)
|
|
55
55
|
|
|
56
56
|
# NewsData.io Python Client
|
|
57
57
|
|
|
58
|
-
[](https://github.com/
|
|
58
|
+
[](https://github.com/newsdataapi/python-client/actions/workflows/ci.yml)
|
|
59
|
+
[](https://github.com/newsdataapi/python-client/blob/main/LICENSE)
|
|
60
60
|
[](https://pypi.org/project/newsdataapi)
|
|
61
61
|
[](https://pypi.org/project/newsdataapi)
|
|
62
62
|
[](https://pypi.org/project/newsdataapi)
|
|
63
|
+
[](https://newsdata.io/openapi.json)
|
|
63
64
|
|
|
64
65
|
</div>
|
|
65
66
|
|
|
@@ -119,7 +120,7 @@ finally:
|
|
|
119
120
|
|
|
120
121
|
All endpoint parameters are keyword-only (except the required `from_date` / `to_date` on the count endpoints). Most accept either a single string or a `list[str]`; lists are comma-joined for the API.
|
|
121
122
|
|
|
122
|
-
See the [NewsData.io documentation](https://newsdata.io/documentation) for the full parameter reference.
|
|
123
|
+
See the [NewsData.io documentation](https://newsdata.io/documentation) — or the [OpenAPI 3.1 spec](https://newsdata.io/openapi.json) — for the full parameter reference.
|
|
123
124
|
|
|
124
125
|
## Three ways to consume an endpoint
|
|
125
126
|
|
|
@@ -220,7 +221,7 @@ Defaults sleep about a minute total across all retries (2 s → 4 s → 8 s →
|
|
|
220
221
|
This project uses [uv](https://github.com/astral-sh/uv) for environment and lock management.
|
|
221
222
|
|
|
222
223
|
```bash
|
|
223
|
-
git clone https://github.com/
|
|
224
|
+
git clone https://github.com/newsdataapi/python-client
|
|
224
225
|
cd python-client
|
|
225
226
|
uv sync # creates .venv, installs runtime + dev deps from uv.lock
|
|
226
227
|
```
|
|
@@ -238,6 +239,21 @@ uv run mypy src/
|
|
|
238
239
|
|
|
239
240
|
Dev dependencies live in PEP 735 `[dependency-groups].dev` (uv-native). Plain `pip install -e ".[dev]"` will not pick them up; if you can't use uv, install the contents of the `dev` group in `pyproject.toml` by hand.
|
|
240
241
|
|
|
242
|
+
## Related libraries
|
|
243
|
+
|
|
244
|
+
Official Newsdata.io clients across languages and runtimes:
|
|
245
|
+
|
|
246
|
+
- **Node.js** — [newsdataapi/newsdata-nodejs-client](https://github.com/newsdataapi/newsdata-nodejs-client) ([npm](https://www.npmjs.com/package/newsdata-nodejs-client))
|
|
247
|
+
- **React (hooks)** — [newsdataapi/newsdata-reactjs-client](https://github.com/newsdataapi/newsdata-reactjs-client) ([npm](https://www.npmjs.com/package/newsdataapi))
|
|
248
|
+
- **PHP** — [newsdataapi/php-client](https://github.com/newsdataapi/php-client) ([Packagist](https://packagist.org/packages/newsdataio/newsdataapi))
|
|
249
|
+
- **Java** — [newsdataapi/newsdata-java-sdk](https://github.com/newsdataapi/newsdata-java-sdk) ([Maven Central](https://central.sonatype.com/artifact/io.newsdata/newsdataapi))
|
|
250
|
+
- **.NET** — [newsdataapi/newsdata-dotnet-sdk](https://github.com/newsdataapi/newsdata-dotnet-sdk) ([NuGet](https://www.nuget.org/packages/Newsdata.Api/))
|
|
251
|
+
- **Go** — [newsdataapi/newsdata-go-client](https://github.com/newsdataapi/newsdata-go-client) ([pkg.go.dev](https://pkg.go.dev/github.com/newsdataapi/newsdata-go-client))
|
|
252
|
+
- **Dart / Flutter** — [newsdataapi/newsdata-flutter-client](https://github.com/newsdataapi/newsdata-flutter-client) ([pub.dev](https://pub.dev/packages/newsdataapi))
|
|
253
|
+
- **MCP Server (AI assistants)** — [newsdataapi/newsdata.io-mcp](https://github.com/newsdataapi/newsdata.io-mcp) ([PyPI](https://pypi.org/project/newsdata-mcp/))
|
|
254
|
+
|
|
255
|
+
Also see [free news datasets](https://github.com/newsdataapi/newsdata.io-free-datasets) for ML / NLP work.
|
|
256
|
+
|
|
241
257
|
## License
|
|
242
258
|
|
|
243
259
|
MIT. See the [LICENSE](LICENSE) file.
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
[](https://newsdata.io)
|
|
4
4
|
|
|
5
5
|
# NewsData.io Python Client
|
|
6
6
|
|
|
7
|
-
[](https://github.com/
|
|
7
|
+
[](https://github.com/newsdataapi/python-client/actions/workflows/ci.yml)
|
|
8
|
+
[](https://github.com/newsdataapi/python-client/blob/main/LICENSE)
|
|
9
9
|
[](https://pypi.org/project/newsdataapi)
|
|
10
10
|
[](https://pypi.org/project/newsdataapi)
|
|
11
11
|
[](https://pypi.org/project/newsdataapi)
|
|
12
|
+
[](https://newsdata.io/openapi.json)
|
|
12
13
|
|
|
13
14
|
</div>
|
|
14
15
|
|
|
@@ -68,7 +69,7 @@ finally:
|
|
|
68
69
|
|
|
69
70
|
All endpoint parameters are keyword-only (except the required `from_date` / `to_date` on the count endpoints). Most accept either a single string or a `list[str]`; lists are comma-joined for the API.
|
|
70
71
|
|
|
71
|
-
See the [NewsData.io documentation](https://newsdata.io/documentation) for the full parameter reference.
|
|
72
|
+
See the [NewsData.io documentation](https://newsdata.io/documentation) — or the [OpenAPI 3.1 spec](https://newsdata.io/openapi.json) — for the full parameter reference.
|
|
72
73
|
|
|
73
74
|
## Three ways to consume an endpoint
|
|
74
75
|
|
|
@@ -169,7 +170,7 @@ Defaults sleep about a minute total across all retries (2 s → 4 s → 8 s →
|
|
|
169
170
|
This project uses [uv](https://github.com/astral-sh/uv) for environment and lock management.
|
|
170
171
|
|
|
171
172
|
```bash
|
|
172
|
-
git clone https://github.com/
|
|
173
|
+
git clone https://github.com/newsdataapi/python-client
|
|
173
174
|
cd python-client
|
|
174
175
|
uv sync # creates .venv, installs runtime + dev deps from uv.lock
|
|
175
176
|
```
|
|
@@ -187,6 +188,21 @@ uv run mypy src/
|
|
|
187
188
|
|
|
188
189
|
Dev dependencies live in PEP 735 `[dependency-groups].dev` (uv-native). Plain `pip install -e ".[dev]"` will not pick them up; if you can't use uv, install the contents of the `dev` group in `pyproject.toml` by hand.
|
|
189
190
|
|
|
191
|
+
## Related libraries
|
|
192
|
+
|
|
193
|
+
Official Newsdata.io clients across languages and runtimes:
|
|
194
|
+
|
|
195
|
+
- **Node.js** — [newsdataapi/newsdata-nodejs-client](https://github.com/newsdataapi/newsdata-nodejs-client) ([npm](https://www.npmjs.com/package/newsdata-nodejs-client))
|
|
196
|
+
- **React (hooks)** — [newsdataapi/newsdata-reactjs-client](https://github.com/newsdataapi/newsdata-reactjs-client) ([npm](https://www.npmjs.com/package/newsdataapi))
|
|
197
|
+
- **PHP** — [newsdataapi/php-client](https://github.com/newsdataapi/php-client) ([Packagist](https://packagist.org/packages/newsdataio/newsdataapi))
|
|
198
|
+
- **Java** — [newsdataapi/newsdata-java-sdk](https://github.com/newsdataapi/newsdata-java-sdk) ([Maven Central](https://central.sonatype.com/artifact/io.newsdata/newsdataapi))
|
|
199
|
+
- **.NET** — [newsdataapi/newsdata-dotnet-sdk](https://github.com/newsdataapi/newsdata-dotnet-sdk) ([NuGet](https://www.nuget.org/packages/Newsdata.Api/))
|
|
200
|
+
- **Go** — [newsdataapi/newsdata-go-client](https://github.com/newsdataapi/newsdata-go-client) ([pkg.go.dev](https://pkg.go.dev/github.com/newsdataapi/newsdata-go-client))
|
|
201
|
+
- **Dart / Flutter** — [newsdataapi/newsdata-flutter-client](https://github.com/newsdataapi/newsdata-flutter-client) ([pub.dev](https://pub.dev/packages/newsdataapi))
|
|
202
|
+
- **MCP Server (AI assistants)** — [newsdataapi/newsdata.io-mcp](https://github.com/newsdataapi/newsdata.io-mcp) ([PyPI](https://pypi.org/project/newsdata-mcp/))
|
|
203
|
+
|
|
204
|
+
Also see [free news datasets](https://github.com/newsdataapi/newsdata.io-free-datasets) for ML / NLP work.
|
|
205
|
+
|
|
190
206
|
## License
|
|
191
207
|
|
|
192
208
|
MIT. See the [LICENSE](LICENSE) file.
|
|
@@ -63,7 +63,7 @@ _STRING_PARAMS = frozenset(
|
|
|
63
63
|
"organization",
|
|
64
64
|
"url",
|
|
65
65
|
"sort",
|
|
66
|
-
"
|
|
66
|
+
"market_id",
|
|
67
67
|
"excludecountry",
|
|
68
68
|
"page",
|
|
69
69
|
"interval",
|
|
@@ -764,7 +764,7 @@ class NewsDataApiClient:
|
|
|
764
764
|
excludefield: str | list[str] | None = None,
|
|
765
765
|
removeduplicate: bool | None = None,
|
|
766
766
|
organization: str | list[str] | None = None,
|
|
767
|
-
|
|
767
|
+
market_id: str | list[str] | None = None,
|
|
768
768
|
id: str | list[str] | None = None,
|
|
769
769
|
url: str | None = None,
|
|
770
770
|
sort: str | None = None,
|
|
@@ -809,7 +809,7 @@ class NewsDataApiClient:
|
|
|
809
809
|
"excludefield": excludefield,
|
|
810
810
|
"removeduplicate": removeduplicate,
|
|
811
811
|
"organization": organization,
|
|
812
|
-
"
|
|
812
|
+
"market_id": market_id,
|
|
813
813
|
"id": id,
|
|
814
814
|
"url": url,
|
|
815
815
|
"sort": sort,
|
|
@@ -1004,7 +1004,7 @@ class NewsDataApiClient:
|
|
|
1004
1004
|
image: bool | None = None,
|
|
1005
1005
|
video: bool | None = None,
|
|
1006
1006
|
organization: str | list[str] | None = None,
|
|
1007
|
-
|
|
1007
|
+
market_id: str | list[str] | None = None,
|
|
1008
1008
|
prioritydomain: str | None = None,
|
|
1009
1009
|
page: str | None = None,
|
|
1010
1010
|
sentiment: str | None = None,
|
|
@@ -1048,7 +1048,7 @@ class NewsDataApiClient:
|
|
|
1048
1048
|
"image": image,
|
|
1049
1049
|
"video": video,
|
|
1050
1050
|
"organization": organization,
|
|
1051
|
-
"
|
|
1051
|
+
"market_id": market_id,
|
|
1052
1052
|
"prioritydomain": prioritydomain,
|
|
1053
1053
|
"page": page,
|
|
1054
1054
|
"sentiment": sentiment,
|
|
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
|