Requests-AEAweb is a custom Requests class to log onto AEAweb.org, the website of the American Economic Association.
Installation
Curently can only be downloaded from source; available on pip very soon.
$ pip install requests_aeaweb
Documentation
Detailed documentation available at www.erinhengel.com/software/requests-aeaweb.
Quickstart
The AEAweb class logs onto AEAweb.org and establishes a connection with the host. The session attribute returns a Request Session object with all the methods of the main Requests API.
>>> from requests_aeaweb import AEAweb
# Establish AEAweb connection object.
>>> deets = {'username': 'someuser', 'password': 'XXXX'}
>>> conn = AEAweb(login=deets)
# Use session attribute to access Requests methods.
>>> url = '{}/articles.php'.format(conn.url)
>>> payload = {'doi': '10.1257/aer.20130626'}
>>> request = conn.session.get(url, params=payload)
>>> request.status_code
200
# Do stuff with your request object.
>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup(request.text, 'html.parser')
>>> soup.title
'AEAweb: AER (106,3) p. 525 - University Differences in the Graduation of Minorities in STEM Fields: Evidence from California'
The AER subclass contains the html, pdf and ref methods to download the webpage HTML, PDF and bibliographic information of articles published in the American Economic Review.
>>> from requests_aeaweb import AER
# Establish AEAweb connection object via AER.
>>> conn = AER(login=deets)
# Download the HTML of the article with document id 10.1257/aer.20140289.
>>> doc_id = '10.1257/aer.20140289'
>>> html = conn.html(id=doc_id)
# Download the document PDF.
>>> pdf = conn.pdf(id=doc_id, file='article.pdf')
# Download the bibliographic information.
>>> biblio = conn.ref(id=doc_id)
>>> biblio['Authors']
[{'Affiliation': 'Johns Hopkins U', 'Name': 'Korinek, Anton'}, {'Affiliation': 'MIT', 'Name': 'Simsek, Alp'}]
Metadata
Release files for requests-aeaweb 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| requests-aeaweb-0.0.1.tar.gz | 5.0 kB | Without provenance | Details for requests-aeaweb-0.0.1.tar.gz |
Release files / requests-aeaweb-0.0.1.tar.gz
| Download URL | requests-aeaweb-0.0.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba4eb805bbb71b6ce826bf23e83a5b56b711f468109262a8f1cf9cb76c25de87
|
|
BLAKE2b-256 checksum How to use checksums |
90997194d8b091c1a1cea8060f3936cf347744cc82d0bbc0bdabb4c51c297897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for requests-aeaweb 0.0.1
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.