Skip to main content

Python library for Apple Books

Project description

PyAppleBooks

PyAppleBooks is a Python library designed to streamline interactions with Apple Books data. It offers a straightforward and intuitive interface, empowering developers to effortlessly access, manipulate, and manage Apple Books content through Python-based applications.

Installation

pip install py_apple_books

Getting Started

Here are some basic examples of how to use PyAppleBooks

from py_apple_books import PyAppleBooks

api = PyAppleBooks()
# Get list of all books
books = api.list_books()
for book in books:
    print('-'*50)
    print(f"Title: {book.title}")
    print(f"Author: {book.author}")
# Get a list of books along with their highlights 
books_with_highlights = api.list_books(include_annotations=True)
for book in books_with_highlights:
    print('-'*50)
    print(f"Title: {book.title}")
    print(f"Author: {book.author}")
    
    print("Annotations:")
    for annotation in book.highlights:
        print(f"\t{annotation.selected_text}")
        if annotation.note:
            print(f"\tNote: {annotation.note}")
# Get a list of collections along with books
collections = api.list_collections(include_books=True)
for collection in collections:
    print('-'*50)
    print(f"Collection: {collection.title}")
    
    print(f"Books in collection: {len(collection.books)}")
    for book in collection.books:
        print(f"\t{book.title}")

Contribution

Thank you for considering contributing to this project! Your help is greatly appreciated.

To contribute to this project, please follow these guidelines:

Opening Issues

If you encounter a bug, have a feature request, or want to discuss something related to the project, please open an issue on the GitHub repository. When opening an issue, please provide:

Bug Reports: Describe the issue in detail. Include steps to reproduce the bug if possible, along with any error messages or screenshots.

Feature Requests: Clearly explain the new feature you'd like to see added to the project. Provide context on why this feature would be beneficial.

General Discussions: Feel free to start discussions on broader topics related to the project.

Contributing

1️⃣ Fork the GitHub repository https://github.com/vgnshiyer/py-apple-books
2️⃣ Create a new branch for your changes (git checkout -b feature/my-new-feature).
3️⃣ Make your changes and test them thoroughly.
4️⃣ Push your changes and open a Pull Request to main.

Please provide a clear title and description of your changes.

License

PyAppleBooks is licensed under the MIT license. 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

py_apple_books-0.2.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

py_apple_books-0.2.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file py_apple_books-0.2.1.tar.gz.

File metadata

  • Download URL: py_apple_books-0.2.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for py_apple_books-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f198d2fad766ba22b1f5179ddb1f48805cc457afd0b5a440ea77755f42e2b050
MD5 f81359357e4135464515b20b84df127c
BLAKE2b-256 1e0e1527693556163416b83d502d1cd525da159bc30a57d861a635fe97ae5f25

See more details on using hashes here.

File details

Details for the file py_apple_books-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for py_apple_books-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d62d6d7b3be01b1733cc4e45cf4de3ebee36a7523e5d1e404ce9cae4939d4b20
MD5 02e33b03aeb5048dd61572d0130908dd
BLAKE2b-256 c8614df77fd1092f20edc1ebc56f440abf8246a403af7808e056c933e75e3e6f

See more details on using hashes here.

Supported by

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