Skip to main content

Python wrapper for the CNX Archive API(

Project description

A Python wrapper around the Archive web api.

Quick start

Instantiate the ArchiveClient:

client = ArchiveClient()

Get a collection:

collection = client.get_collection("7fccc9cf-9b71-44f6-800b-f9457fd64335")

You now have access to lots of information about the collection.

>> "Chemistry 2e"
>> "9.18"

If you need to access a subcollection or module you can explore collection.table_of_contents

toc = collection.table_of_contents
for item in toc.contents
>><Module [Preface]>
>><SubCollection [Essential Ideas]>
>><SubCollection [Atoms, Molecules, and Ions]>
>><SubCollection [Composition of Substances and Solutions]>

You can grab a module from the contents and get other information:

module = toc.contents[0]
>>"<span class="os-text">Preface</span>"

If you want to print the json or the html version you can do that too

module = toc.contents[0]
module_html = module.get_html()
>><html xmlns=""><head><meta name="robots" content="noindex"/></head><body><div data-type="page" id="138634ed-6ed0-4edb-b13d-b78d388028b0" class="preface" ...

Project details

Download files

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

Files for archive-api-client, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size archive-api-client-0.0.1.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page