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.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

py_apple_books-0.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for py_apple_books-0.2.0.tar.gz
Algorithm Hash digest
SHA256 01d14ab22f97c86f00698c3a9c78a9361c73191abcd3bb8a04c8ecf1c6fbe0e6
MD5 fc11247db585bae29315e36e2961473e
BLAKE2b-256 ebceaae78f82fcec255681c24ce164e598322b2e8c99f4adb2229ca1a9ece125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_apple_books-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b748e366c610cfdb77256187b106aab9f56dd9217e11558165fc6fbfd7e4f89
MD5 b8f021b7d43e09dbcd1b973278cdf6bf
BLAKE2b-256 cb30580b7c37a4a906d14cfb79689d570945dc718fa696c0e9c970a0c34318ba

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