Skip to main content

An unoffical API for the New York Public Library

Project description

NYPL API
=========
An unofficial API for the New York Public Library Catalog

Dependencies
-----------

- requests (pip install requests)
- BeautifulSoup4 (pip install beautifulsoup4)

Installation
--------------

pip install NYPL_API


Use
----
>>> from NYPL import search
>>> search(title="The View from Saturday", author="E.L. Konigsburg")

Sample
---
see example.py (https://github.com/susinmotion/NYPL/blob/master/example.py)

Output
---
Results are output as a list of Book objects, which have the following attributes:
- author
- title (in the format "title (genre)" )
- link_to_copies (url to a page of the libraries that have the book)
- copies (a list of all copies of the book)*
- available_copies (a list of *available* copies of the book)*

copies and available_copies are represented as lists of Copy objects, which have the following attributes:
- location (eg. "96th Street")
- collection (eg. "96th Street Children's Fiction")
- callNo (call number, eg. "J FIC K"
- status (eg. "DUE 10-28-14")

* copies and available copies are not generated automatically with default search. They can be generated automatically with robust search:

search(keyword, title, author, lazy=False)


More Info
--------

Unfortunately, the official New York Public Library is only available to library employees, and during library hack-a-thons. Now, it's data anytime--Happy developing!

Feedback is most welcome.
https://github.com/susinmotion/NYPL_API

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NYPL-0.1.12.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file NYPL-0.1.12.tar.gz.

File metadata

  • Download URL: NYPL-0.1.12.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for NYPL-0.1.12.tar.gz
Algorithm Hash digest
SHA256 bc486bd7324ba2bd81ca7497ec186ab9121728e682f700663ac11726da92c0f9
MD5 e1833bb79264ec52693d979ef8c9bb0d
BLAKE2b-256 f4b8ccd7b1f2f1c136622c77e4cb1f63f7acd23957ae7f8feb1a6d682232ed52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page