newsdataapi 0.2.0__tar.gz → 0.2.2__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.0 → newsdataapi-0.2.2}/PKG-INFO +24 -8
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/README.md +21 -5
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/pyproject.toml +15 -2
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/src/newsdataapi/__init__.py +1 -1
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/src/newsdataapi/client.py +5 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/.github/workflows/ci.yml +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/.github/workflows/publish.yml +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/.gitignore +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/.python-version +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/LICENSE +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/examples/basic_usage.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/newsdata-logo.png +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/src/newsdataapi/constants.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/src/newsdataapi/csv_export.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/src/newsdataapi/exceptions.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/src/newsdataapi/py.typed +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/tests/__init__.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/tests/conftest.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/tests/test_integration.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/tests/test_unit.py +0 -0
- {newsdataapi-0.2.0 → newsdataapi-0.2.2}/uv.lock +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: newsdataapi
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Official Python SDK for the
|
|
3
|
+
Version: 0.2.2
|
|
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
|
|
7
7
|
Project-URL: Repository, https://github.com/bytesview/python-client
|
|
@@ -29,7 +29,7 @@ License: MIT License
|
|
|
29
29
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
30
|
SOFTWARE.
|
|
31
31
|
License-File: LICENSE
|
|
32
|
-
Keywords: api,news,news-
|
|
32
|
+
Keywords: api-client,crypto-news,financial-news,market-news,news,news-aggregator,news-api,newsdata,newsdata-io,python-sdk,rest-api,sdk
|
|
33
33
|
Classifier: Development Status :: 4 - Beta
|
|
34
34
|
Classifier: Intended Audience :: Developers
|
|
35
35
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "newsdataapi"
|
|
3
|
-
description = "Official Python SDK for the
|
|
3
|
+
description = "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."
|
|
4
4
|
dynamic = ["version"]
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -11,7 +11,20 @@ dependencies = [
|
|
|
11
11
|
"requests>=2.25,<3",
|
|
12
12
|
]
|
|
13
13
|
|
|
14
|
-
keywords = [
|
|
14
|
+
keywords = [
|
|
15
|
+
"news",
|
|
16
|
+
"newsdata",
|
|
17
|
+
"newsdata-io",
|
|
18
|
+
"news-api",
|
|
19
|
+
"rest-api",
|
|
20
|
+
"api-client",
|
|
21
|
+
"python-sdk",
|
|
22
|
+
"sdk",
|
|
23
|
+
"crypto-news",
|
|
24
|
+
"financial-news",
|
|
25
|
+
"market-news",
|
|
26
|
+
"news-aggregator",
|
|
27
|
+
]
|
|
15
28
|
|
|
16
29
|
classifiers = [
|
|
17
30
|
"Development Status :: 4 - Beta",
|
|
@@ -64,6 +64,7 @@ _STRING_PARAMS = frozenset(
|
|
|
64
64
|
"url",
|
|
65
65
|
"sort",
|
|
66
66
|
"symbol",
|
|
67
|
+
"market_id",
|
|
67
68
|
"excludecountry",
|
|
68
69
|
"page",
|
|
69
70
|
"interval",
|
|
@@ -765,6 +766,7 @@ class NewsDataApiClient:
|
|
|
765
766
|
removeduplicate: bool | None = None,
|
|
766
767
|
organization: str | list[str] | None = None,
|
|
767
768
|
symbol: str | list[str] | None = None,
|
|
769
|
+
market_id: str | list[str] | None = None,
|
|
768
770
|
id: str | list[str] | None = None,
|
|
769
771
|
url: str | None = None,
|
|
770
772
|
sort: str | None = None,
|
|
@@ -810,6 +812,7 @@ class NewsDataApiClient:
|
|
|
810
812
|
"removeduplicate": removeduplicate,
|
|
811
813
|
"organization": organization,
|
|
812
814
|
"symbol": symbol,
|
|
815
|
+
"market_id": market_id,
|
|
813
816
|
"id": id,
|
|
814
817
|
"url": url,
|
|
815
818
|
"sort": sort,
|
|
@@ -1005,6 +1008,7 @@ class NewsDataApiClient:
|
|
|
1005
1008
|
video: bool | None = None,
|
|
1006
1009
|
organization: str | list[str] | None = None,
|
|
1007
1010
|
symbol: str | list[str] | None = None,
|
|
1011
|
+
market_id: str | list[str] | None = None,
|
|
1008
1012
|
prioritydomain: str | None = None,
|
|
1009
1013
|
page: str | None = None,
|
|
1010
1014
|
sentiment: str | None = None,
|
|
@@ -1049,6 +1053,7 @@ class NewsDataApiClient:
|
|
|
1049
1053
|
"video": video,
|
|
1050
1054
|
"organization": organization,
|
|
1051
1055
|
"symbol": symbol,
|
|
1056
|
+
"market_id": market_id,
|
|
1052
1057
|
"prioritydomain": prioritydomain,
|
|
1053
1058
|
"page": page,
|
|
1054
1059
|
"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
|