Python SDK for interacting with Sammler GraphQL API
Project description
Sammler Python SDK
The official Python SDK for interacting with the Sammler GraphQL API.
This SDK is async-first, type-safe, and powered by httpx and pydantic. It allows developer-tier Sammler users to programmatically manage, query, and update their personal collections.
Features
- Async/Await Support: Built on top of
httpxfor efficient, non-blocking network calls. - Type Safety: All responses are fully parsed into Pydantic models for auto-completion and compile-time checks.
- Developer Profile Integration: Direct access to your collections, items, and profile details using your Sammler API key.
Installation
Install the package via pip from PyPI:
pip install sammler-sdk
Quick Start
To use the SDK, you need a Sammler API Key. Once you have it, you can instantiate the client as an async context manager:
import asyncio
from sammler import SammlerClient
async def main():
# Initialize the client with your API key
async with SammlerClient(api_key="your_sammler_api_key") as client:
# Retrieve all of your collections
collections = await client.get_collections()
print(f"Found {len(collections)} collection(s):")
for collection in collections:
print(f"- {collection.name}: {collection.description or 'No description'}")
if __name__ == "__main__":
asyncio.run(main())
Available SDK Methods
The SammlerClient exposes high-level async methods matching the Sammler API:
get_current_user(): Retrieve the authenticated developer user's profile info (ID, name, email, tier, etc.).get_collections(): Retrieve all collections belonging to the authenticated user.get_collection(id: str): Retrieve a specific collection by its ID, including all items inside it.get_items(): Retrieve all collection items across all collections.get_item(id: str): Retrieve a single item by its ID, including details about its parent collection.
Raw client access
If you need direct access to the underlying raw queries/operations without wrapper methods, you can use client.raw_client.
Code Generation & Development
If you want to modify queries or develop/contribute to the SDK:
- Clone the repository and set up a virtual environment:
python3 -m venv .venv source .venv/bin/activate
- Install the package in editable mode with development dependencies:
pip install -e . pip install "ariadne-codegen[http]"
- Update queries in
graphql/operations.graphqland run codegen:ariadne-codegen
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
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 sammler_sdk-1.1.1.tar.gz.
File metadata
- Download URL: sammler_sdk-1.1.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10960d08f2798bf7e6bddcccccfedcfb24b9e2a50da0c68e8fc278fdb59f9323
|
|
| MD5 |
ea75b43f01a718713821b3b3a31851dc
|
|
| BLAKE2b-256 |
039f952629885c3802c726b4f3c98d46ccc1e097ce58fffbf411220b15115494
|
Provenance
The following attestation bundles were made for sammler_sdk-1.1.1.tar.gz:
Publisher:
release-and-publish.yml on beverts312/sammler-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sammler_sdk-1.1.1.tar.gz -
Subject digest:
10960d08f2798bf7e6bddcccccfedcfb24b9e2a50da0c68e8fc278fdb59f9323 - Sigstore transparency entry: 1741062150
- Sigstore integration time:
-
Permalink:
beverts312/sammler-sdk@fd2e43e825c3d60f62760820f09e2e153c65b1aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/beverts312
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-and-publish.yml@fd2e43e825c3d60f62760820f09e2e153c65b1aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file sammler_sdk-1.1.1-py3-none-any.whl.
File metadata
- Download URL: sammler_sdk-1.1.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d814f30d4a938a7ec13992de10e91dbbc7690217ca70002cf8028990d8b8b7e
|
|
| MD5 |
31400b7cba20fc71b03bdd1b0bb02966
|
|
| BLAKE2b-256 |
fb708c8903cdaea90b21ae98519ea5079553173e48fbdf4d26d73935731fd8ee
|
Provenance
The following attestation bundles were made for sammler_sdk-1.1.1-py3-none-any.whl:
Publisher:
release-and-publish.yml on beverts312/sammler-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sammler_sdk-1.1.1-py3-none-any.whl -
Subject digest:
8d814f30d4a938a7ec13992de10e91dbbc7690217ca70002cf8028990d8b8b7e - Sigstore transparency entry: 1741062174
- Sigstore integration time:
-
Permalink:
beverts312/sammler-sdk@fd2e43e825c3d60f62760820f09e2e153c65b1aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/beverts312
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-and-publish.yml@fd2e43e825c3d60f62760820f09e2e153c65b1aa -
Trigger Event:
push
-
Statement type: