Skip to main content

APS Journals

A pythonic interface for browsing APS

The apsjournals library is a collection of tools used for exploring American Physical Society publications via python.

Test Result: CircleCI

Motivation

Admittedly, the APS website is well-built. Why apsjournals then?

  1. The APS website does not offer an official API. This library offers a set of usable abstractions to help explore some of the available data.
  2. It is not possible to download an entire Issue as a single PDF in the current website. Future versions of apsjournals will offer such behavior.
  3. Why not? Interacting with APS publications via Python is fun.

Loading Articles for a Journal Issue

The apsjournals library offers several ways to load articles. The easiest of which is by picking a Journal, then specifying a volume and issue number. The library will then load the entire issue, including all articles. For example:

>>> from apsjournals import PRL
>>> PRL
Journal('Physical Review Letters')

>>> PRL.issue(121, 6)
Issue('Physical Review Letters', 121, 6)

>>> PRL.issue(121, 6).articles[:3]
[Article('Magnetic Levitation Stabilized by Streaming Fluid Flows'),
 Article('First Six Dimensional Phase Space Measurement of an Accelerator Beam'),
 Article('Ubiquitous Spin-Orbit Coupling in a Screw Dislocation with High Spin Coherency')]

Download Journal Articles

In addition to surveying which articles are in an issue, apsjournals is also capable of downloading articles, either individually or as an entire issue. In the latter case, a cover page and table of contents will also be added to the pdf (including appropriately linked bookmarks).

Authentication

The first step to downloading articles is authentication. You must be a valid APS member. this library abides by all APS Terms and Conditions, and consequently relies on you for credentials to access APS material. Authentication can be performed by using the authenticate function:

>>> import apsjournals
>>> apsjournals.authenticate('username', 'password')

This will set a session cookie required for pdf downloads.

Downloading an Article

After authenticating, it is then possible to download articles from an issue individually or as a whole. To download an individual article, use the pdf method of the Article instance. Specifically:

>>> journal = apsjournals.PRL
>>> issue = journal.issue(121, 6)
>>> article = issue.articles[3]
>>> article.pdf('path/to/file.pdf')

This will download the article as a pdf to the given location.

Download an Entire Issue

In order to download all the articles at once, simply use the pdf method of the Issue instance! For example:

>>> issue.pdf('path/to/file.pdf')

Metadata

Release files for apsjournals 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apsjournals 0.2.0
File Size Uploaded Provenance Actions
apsjournals-0.2.0.tar.gz 22.8 kB Without provenance Details for apsjournals-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apsjournals 0.2.0
File Interpreter ABI Platform Actions
apsjournals-0.2.0-py3-none-any.whl Python 3 none any Details for apsjournals-0.2.0-py3-none-any.whl

Total release size: 48.1 kB

Release files / apsjournals-0.2.0.tar.gz

Download URL apsjournals-0.2.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
87166ea354cde2dffc9e83a5e08edbb27c0d834fa83978fe23f5fc8709117ecd
BLAKE2b-256 checksum
How to use checksums
48c789179fa3b0dafd3211ba4b96b98295ca811cd2a2488476dfa412d84944da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

Release files / apsjournals-0.2.0-py3-none-any.whl

Download URL apsjournals-0.2.0-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b080d215dfd73fd5238d70aa6226e9c3403c107027598af490f0c5445580f2d3
BLAKE2b-256 checksum
How to use checksums
1f8f8dc7bf2589634944aef8f4907d0cabb1b7d6566cf60d3b0b773432ae5509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

Security for apsjournals 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page