Skip to main content

🌅 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

Apache-2.0

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

sunset_core-0.1.1.tar.gz (155.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sunset_core-0.1.1-py3-none-any.whl (185.9 kB view details)

Uploaded Python 3

File details

Details for the file sunset_core-0.1.1.tar.gz.

File metadata

  • Download URL: sunset_core-0.1.1.tar.gz
  • Upload date:
  • Size: 155.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sunset_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cbb5018fe80c284602c14adb6e759ffe7759aa711b4f1a32bc847aa0e79eb9b8
MD5 04dd1d78a0d91d288e46e88b248e2a8d
BLAKE2b-256 85c7a5e12e12fd1dd8f71580d92ac5b36c830a84dd9d54b326a85e8bc09922db

See more details on using hashes here.

Provenance

The following attestation bundles were made for sunset_core-0.1.1.tar.gz:

Publisher: release.yml on RubenBSB/sunset-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sunset_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sunset_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 185.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sunset_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3009f732b38094986dadc7caed6d290e49f1ddd3d21e6d97c304506d3889e73
MD5 c52442eea99d92c52b2a987019e66725
BLAKE2b-256 4a4962d42173c11ccf488ce1e36c5bdd503e1f8c60901827bfd913ba88431e72

See more details on using hashes here.

Provenance

The following attestation bundles were made for sunset_core-0.1.1-py3-none-any.whl:

Publisher: release.yml on RubenBSB/sunset-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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