pyalex 0.15__py3-none-any.whl → 0.15.1__py3-none-any.whl

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/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.15'
16
- __version_tuple__ = version_tuple = (0, 15)
15
+ __version__ = version = '0.15.1'
16
+ __version_tuple__ = version_tuple = (0, 15, 1)
pyalex/api.py CHANGED
@@ -23,7 +23,7 @@ class AlexConfig(dict):
23
23
  config = AlexConfig(
24
24
  email=None,
25
25
  api_key=None,
26
- user_agent="pyalex/{__version__}",
26
+ user_agent=f"pyalex/{__version__}",
27
27
  openalex_url="https://api.openalex.org",
28
28
  max_retries=0,
29
29
  retry_backoff_factor=0.1,
@@ -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.
@@ -0,0 +1,8 @@
1
+ pyalex/__init__.py,sha256=52XK8om6IVD1Yiq_HYOCR6PUY56sPRHutGM03NOrGMQ,1467
2
+ pyalex/_version.py,sha256=po5_rvCFTU8xU9IC56wyK0-zfBgz_U4xX6CO2mv9Mzs,413
3
+ pyalex/api.py,sha256=JTOx0P037IOhhYVAigQO5uPsd1HMQC-SM3wny0_52uU,13236
4
+ pyalex-0.15.1.dist-info/LICENSE,sha256=Mhf5MImRYP06a1EPVJCpkpTstOOEfGajN3T_Fz4izMg,1074
5
+ pyalex-0.15.1.dist-info/METADATA,sha256=JSa8cKcjZUZ-lDo28WyuFN1GHEEWUHWLvSLaKh3IP10,13859
6
+ pyalex-0.15.1.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
7
+ pyalex-0.15.1.dist-info/top_level.txt,sha256=D0An8hWy9e0xPhTaT6K-yuJKVeVV3bYGxZ6Y-v2WXSU,7
8
+ pyalex-0.15.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.2.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- pyalex/__init__.py,sha256=52XK8om6IVD1Yiq_HYOCR6PUY56sPRHutGM03NOrGMQ,1467
2
- pyalex/_version.py,sha256=poZz4oZoUd1b8WrBvqHJC0SHzGSqhHsFiUSMJDd_Hcw,408
3
- pyalex/api.py,sha256=IhqRtjy5LtlYffjaHWxRBmKPSIaaXbGqt8qYhKo9YbE,13235
4
- pyalex-0.15.dist-info/LICENSE,sha256=Mhf5MImRYP06a1EPVJCpkpTstOOEfGajN3T_Fz4izMg,1074
5
- pyalex-0.15.dist-info/METADATA,sha256=pkDIkcjUnuqePUCdNdXZeRouKh9p16s5g0N0rcYhXxc,13583
6
- pyalex-0.15.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
7
- pyalex-0.15.dist-info/top_level.txt,sha256=D0An8hWy9e0xPhTaT6K-yuJKVeVV3bYGxZ6Y-v2WXSU,7
8
- pyalex-0.15.dist-info/RECORD,,