🌅 Reusable async services for AI applications — auth, LLM, RAG, storage, pub/sub, and more.
Project description
🌅 sunset-core
Reusable async services for AI applications — auth, LLM routing, RAG, storage, pub/sub, and more — in one pip-installable package.
Every service is async-first (asyncpg, aio methods), lazy-loaded (you only import the heavy dependency you actually use), and provider-agnostic where it makes sense (LLM routing, multi-provider email, etc.).
Install
pip install sunset-core # base: auth-less, light footprint
pip install "sunset-core[llm]" # add the LLM providers
pip install "sunset-core[all]" # everything
Extras map to service groups: auth, llm, retrieval, gcp, analytics, email, crawl, redis, asr, youtube, observability.
Usage
Services are imported from the sunset.services namespace:
from sunset.services import LLMService, RetrievalService, AuthService
llm = LLMService(...)
response = await llm.chat(model="gemini-2.5-flash", messages=[...])
RetrievalService (RAG)
from sunset.services.retrieval import RetrievalService
svc = RetrievalService(dsn=DATABASE_URL, project=GCP_PROJECT)
await svc.connect()
chunks = await svc.ingest_document("report.pdf", describe_images=True)
results = await svc.query("What is the refund policy?", top_k=5)
await svc.close()
Available services
| Service | What it does |
|---|---|
AuthService |
JWT with refresh rotation, OAuth (Google, Apple, Microsoft) |
LLMService |
Multi-provider LLM (OpenAI / Gemini), tool use, structured output |
RetrievalService |
RAG: Docling parsing, chunking, Vertex AI embeddings, pgvector |
StorageService |
GCS upload, signed URLs, deletion |
PubSubService |
Google Cloud Pub/Sub messaging |
SecretsService |
Google Secret Manager |
EmailSendService |
Transactional email (Resend / SendGrid) |
WhatsappService |
WhatsApp Cloud API messaging + webhooks |
SlackService |
Slack OAuth v2 + Web API |
AnalyticsService |
PostHog event tracking |
MonitoringService |
Google Cloud Monitoring |
CrawlService |
Web crawling (Playwright / Firecrawl) |
RedisService |
Async Redis client |
ASRService |
Speech-to-text (Deepgram) |
init_observability |
OpenTelemetry bootstrap: traces + metrics, LLM cost/token metrics |
…plus InstagramService, YouTubeService, ShopifyService, GoogleDriveService, HubspotService, SEOService, DuffelService, BookingService, ChatService, MultimodalEmbeddingService.
Each service ships its own integration guide at sunset/services/<name>/README.md.
License
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 sunset_core-0.1.0.tar.gz.
File metadata
- Download URL: sunset_core-0.1.0.tar.gz
- Upload date:
- Size: 155.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
847128c8a5e0fd24e86f51d3738e44e00126bd00ea66ce0299473170bdd2b429
|
|
| MD5 |
eef28265681d69dceacb67ddcb70a9b1
|
|
| BLAKE2b-256 |
9f292c95ea381fcd9888c3e67193474be68af572fb050cfa4f68c964a97abef8
|
Provenance
The following attestation bundles were made for sunset_core-0.1.0.tar.gz:
Publisher:
release.yml on RubenBSB/sunset-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sunset_core-0.1.0.tar.gz -
Subject digest:
847128c8a5e0fd24e86f51d3738e44e00126bd00ea66ce0299473170bdd2b429 - Sigstore transparency entry: 1954191168
- Sigstore integration time:
-
Permalink:
RubenBSB/sunset-core@d8db7e707d1886591b0f46e0701dfe4ecc4091f1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/RubenBSB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d8db7e707d1886591b0f46e0701dfe4ecc4091f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sunset_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sunset_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 185.8 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 |
078b69b4f489145e8292f6af5673d4c48c11121aa3707187a42763d8e6c5ede4
|
|
| MD5 |
08df08437f77c575af21039d35514d47
|
|
| BLAKE2b-256 |
9159fd3a852ee212aac1e103bd8661262b86807bc40ae089ebdc13b66c6211e8
|
Provenance
The following attestation bundles were made for sunset_core-0.1.0-py3-none-any.whl:
Publisher:
release.yml on RubenBSB/sunset-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sunset_core-0.1.0-py3-none-any.whl -
Subject digest:
078b69b4f489145e8292f6af5673d4c48c11121aa3707187a42763d8e6c5ede4 - Sigstore transparency entry: 1954191278
- Sigstore integration time:
-
Permalink:
RubenBSB/sunset-core@d8db7e707d1886591b0f46e0701dfe4ecc4091f1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/RubenBSB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d8db7e707d1886591b0f46e0701dfe4ecc4091f1 -
Trigger Event:
push
-
Statement type: