pyalex 0.15__tar.gz → 0.15.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.
- {pyalex-0.15 → pyalex-0.15.1}/PKG-INFO +13 -1
- {pyalex-0.15 → pyalex-0.15.1}/README.md +12 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex/_version.py +2 -2
- {pyalex-0.15 → pyalex-0.15.1}/pyalex/api.py +1 -1
- {pyalex-0.15 → pyalex-0.15.1}/pyalex.egg-info/PKG-INFO +13 -1
- {pyalex-0.15 → pyalex-0.15.1}/tests/test_pyalex.py +11 -0
- {pyalex-0.15 → pyalex-0.15.1}/.github/workflows/python-lint.yml +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/.github/workflows/python-package.yml +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/.github/workflows/python-publish.yml +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/.gitignore +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/.pre-commit-config.yaml +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/CITATION.cff +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/LICENSE +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex/__init__.py +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex.egg-info/SOURCES.txt +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex.egg-info/dependency_links.txt +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex.egg-info/requires.txt +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex.egg-info/top_level.txt +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex_repocard.png +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyalex_repocard.svg +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/pyproject.toml +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/setup.cfg +0 -0
- {pyalex-0.15 → pyalex-0.15.1}/tests/test_paging.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyalex
|
|
3
|
-
Version: 0.15
|
|
3
|
+
Version: 0.15.1
|
|
4
4
|
Summary: Python interface to the OpenAlex database
|
|
5
5
|
Author-email: Jonathan de Bruin <jonathandebruinos@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -378,6 +378,18 @@ Works()["W2023271753"].ngrams()
|
|
|
378
378
|
```
|
|
379
379
|
|
|
380
380
|
|
|
381
|
+
### Serialize
|
|
382
|
+
|
|
383
|
+
All results from PyAlex can be serialized. For example, save the results to a JSON file:
|
|
384
|
+
|
|
385
|
+
```python
|
|
386
|
+
with open(Path("works.json"), "w") as f:
|
|
387
|
+
json.dump(Works().get(), f)
|
|
388
|
+
|
|
389
|
+
with open(Path("works.json")) as f:
|
|
390
|
+
works = [Work(w) for w in json.load(f)]
|
|
391
|
+
```
|
|
392
|
+
|
|
381
393
|
## Code snippets
|
|
382
394
|
|
|
383
395
|
A list of awesome use cases of the OpenAlex dataset.
|
|
@@ -354,6 +354,18 @@ Works()["W2023271753"].ngrams()
|
|
|
354
354
|
```
|
|
355
355
|
|
|
356
356
|
|
|
357
|
+
### Serialize
|
|
358
|
+
|
|
359
|
+
All results from PyAlex can be serialized. For example, save the results to a JSON file:
|
|
360
|
+
|
|
361
|
+
```python
|
|
362
|
+
with open(Path("works.json"), "w") as f:
|
|
363
|
+
json.dump(Works().get(), f)
|
|
364
|
+
|
|
365
|
+
with open(Path("works.json")) as f:
|
|
366
|
+
works = [Work(w) for w in json.load(f)]
|
|
367
|
+
```
|
|
368
|
+
|
|
357
369
|
## Code snippets
|
|
358
370
|
|
|
359
371
|
A list of awesome use cases of the OpenAlex dataset.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyalex
|
|
3
|
-
Version: 0.15
|
|
3
|
+
Version: 0.15.1
|
|
4
4
|
Summary: Python interface to the OpenAlex database
|
|
5
5
|
Author-email: Jonathan de Bruin <jonathandebruinos@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -378,6 +378,18 @@ Works()["W2023271753"].ngrams()
|
|
|
378
378
|
```
|
|
379
379
|
|
|
380
380
|
|
|
381
|
+
### Serialize
|
|
382
|
+
|
|
383
|
+
All results from PyAlex can be serialized. For example, save the results to a JSON file:
|
|
384
|
+
|
|
385
|
+
```python
|
|
386
|
+
with open(Path("works.json"), "w") as f:
|
|
387
|
+
json.dump(Works().get(), f)
|
|
388
|
+
|
|
389
|
+
with open(Path("works.json")) as f:
|
|
390
|
+
works = [Work(w) for w in json.load(f)]
|
|
391
|
+
```
|
|
392
|
+
|
|
381
393
|
## Code snippets
|
|
382
394
|
|
|
383
395
|
A list of awesome use cases of the OpenAlex dataset.
|
|
@@ -244,6 +244,17 @@ def test_serializable(tmpdir):
|
|
|
244
244
|
assert "W4238809453" in json.load(f)["id"]
|
|
245
245
|
|
|
246
246
|
|
|
247
|
+
def test_serializable_list(tmpdir):
|
|
248
|
+
with open(Path(tmpdir, "test.json"), "w") as f:
|
|
249
|
+
json.dump(Works().get(), f)
|
|
250
|
+
|
|
251
|
+
with open(Path(tmpdir, "test.json")) as f:
|
|
252
|
+
works = [Work(w) for w in json.load(f)]
|
|
253
|
+
|
|
254
|
+
assert len(works) == 25
|
|
255
|
+
assert all(isinstance(w, Work) for w in works)
|
|
256
|
+
|
|
257
|
+
|
|
247
258
|
def test_ngrams_without_metadata():
|
|
248
259
|
r = Works()["W2023271753"].ngrams(return_meta=False)
|
|
249
260
|
|
|
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
|