Hardcover API wrapper for Python
Project description
[!WARNING] This package is currently in Alpha development, so download at your own risk.
hardpycover
Simplified API Wrapper for Hardcover, written in Python.
Introduction
Hardcover is a Goodreads alternative where the focus is on building a better replacement while providing a publicly-accessible API for all users to explore and use in their various other projects.
In this context, hardpycover is born out of an interest to develop a Python API Wrapper in the same vein as TMDB's API. Powered by sgqlc and pydantic, this wrapper intentionally provides an extra layer of abstraction to ensure that the API use is not just effective, but also efficient and safe-to-use.
Installation
pip
pip install hardpycover
uv
uv add hardpycover
Usage
[!NOTE] Using
hardpycoverrequires having an API Key from Hardcover. To avail of an API Key, create a Hardcover account and then go to https://hardcover.app/account/api.
import os
from hardpycover import Hardcover
# Store your API_KEY in an .env file
API_KEY=abcdefg12345
# ...
token = os.environ["API_KEY"]
# create hardcover instance
hc = Hardcover(token=token)
Getting User Information
hc.query.user_profile(['id', 'bio', 'created_at', 'username'])
# > {
# 'id': 2,
# 'bio' 'Lorem ipsum dolores amit',
# 'created_at': '2025-06-23T10:10:10.32341Z',
# 'username': 'kennyrogers'
# }
For more use cases, read the available methods found at main.py.
Contributors
License
MIT License – Free to use, modify, and share.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hardpycover-0.1.5.tar.gz.
File metadata
- Download URL: hardpycover-0.1.5.tar.gz
- Upload date:
- Size: 82.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7acc3e102a3eee2b21fb285771a1f9926544b47246eb2fd1f9e384e9706c1a4
|
|
| MD5 |
f1da0bdef80e7844f1f6c6e5c4f0efd2
|
|
| BLAKE2b-256 |
1eddc0754bc409155f5f5fbbcf22cfda005b95d64368417f9724fd5ccf54f10b
|
File details
Details for the file hardpycover-0.1.5-py3-none-any.whl.
File metadata
- Download URL: hardpycover-0.1.5-py3-none-any.whl
- Upload date:
- Size: 92.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51b0981b52668320058484ce7b241b3a929a15bf6881058042fe2ad75c0747a3
|
|
| MD5 |
3c10668fc9bbc4d2c85ed8b83403cfdd
|
|
| BLAKE2b-256 |
7e04ef1515f260391bda258e17f6a578098f4e7c71aa349cf6964c72863b9ad5
|