Skip to main content

A Python library to interact with the Archive-It's API

Project description

$\color{Red}\Huge{\textsf{🚨THIS LIBRARY IS UNDER ACTIVE DEVELOPMENT. USE AT YOUR OWN RISK.🚨}}$

📦 Pyarchiveit

Pyarchiveit is a Python library designed to interact with the Internet Archive's Archive-it API. It provides a simple interface to manage the seeds and collections within Archive-it accounts.

✨ Features

  • Create and update seeds with metadata validation
  • Retrieve seed lists with their metadata for single or multiple collections

📥 Installation

You can install the library using pip:

pip install pyarchiveit

Or use uv if you have it installed:

uv add pyarchiveit

💡 Quick Start

See the Getting Started guide for detailed installation and initialization instructions.

Create a new seed with metadata

metadata = [
    {"value": "Example Metadata 1"},
    {"value": "Example Metadata 2"}
]
new_seed = archive_it_client.create_seed(
    collection_id=123456,
    url='http://example.com',
    crawl_definition_id=789012,
    other_params=None,
    metadata=metadata
)

Update an existing seed's metadata

updated_metadata = [
    {"value": "Updated Metadata 1"},
    {"value": "Updated Metadata 2"}
]
updated_seed = archive_it_client.update_seed_metadata(
    seed_id=123456,
    metadata=updated_metadata
)

Retrieve seed lists

# Get seed list of a collection
seeds = archive_it_client.get_seeds(collection_ids=123456)

# Or get seeds from multiple collections
seeds = archive_it_client.get_seeds(collection_ids=[123456, 789012])

📚 Documentation

Visit the documentation site for complete guides and API reference.

⚫ Support

For questions or support, please open an issue on the GitHub repository.

🖊️ Author

Ken Lui - Data Curation Specialist at Map & Data Library, University of Toronto

📄 License

This project is licensed under the GNU GPLv3 - see the LICENSE file for details.

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

pyarchiveit-0.3.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyarchiveit-0.3.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pyarchiveit-0.3.3.tar.gz.

File metadata

  • Download URL: pyarchiveit-0.3.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.7

File hashes

Hashes for pyarchiveit-0.3.3.tar.gz
Algorithm Hash digest
SHA256 4d9dab2629248611525534e096d0794cacc42cd822381b3d0c42f0516f5f4562
MD5 f1d89844d2d01181af2e66eb82724ca1
BLAKE2b-256 247a3d6c3ca01f2b6c0cee98a2a73e43c2a84225b38b143a694091b291f16923

See more details on using hashes here.

File details

Details for the file pyarchiveit-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyarchiveit-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4585f806e0775d80bcf580b89be1beb2d575bb1581e86c5ab44f798524f562a6
MD5 c2e570ff2f9b237ecd034a956280d7cd
BLAKE2b-256 bf2a42895cbf4f70642f4dfe43cb8181dc2c200d88e123f864ab8b9d124e4bf0

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