Cross-platform OAuth integrations SDK for NoSpoon applications
Project description
NoSpoon Integrations - Python SDK
Cross-platform OAuth integrations SDK for NoSpoon applications.
Installation
pip install nospoon-integrations
# With Supabase support
pip install nospoon-integrations[supabase]
Quick Start
The IntegrationClient constructor takes storage plus one keyword argument per
provider you want to enable (each with its provider-specific config).
import os
from nospoon_integrations import IntegrationClient, ProviderConfig
from nospoon_integrations.storage import SupabaseTokenStorage
# Initialize storage
storage = SupabaseTokenStorage(
supabase_url=os.environ["SUPABASE_URL"],
supabase_key=os.environ["SUPABASE_SERVICE_ROLE_KEY"],
)
# Initialize client with the providers you need (flat keyword arguments)
integrations = IntegrationClient(
storage=storage,
google=ProviderConfig(
client_id=os.environ["GOOGLE_CLIENT_ID"],
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
scopes=["https://www.googleapis.com/auth/gmail.compose"],
),
hubspot=ProviderConfig(
client_id=os.environ["HUBSPOT_CLIENT_ID"],
client_secret=os.environ["HUBSPOT_CLIENT_SECRET"],
),
)
# OAuth providers: redirect the user, then handle the callback
auth_url = integrations.google.get_auth_url("https://myapp.com/callback")
status = await integrations.google.get_connection_status(user_id)
Credential providers (WordPress, Sanity)
WordPress and Sanity authenticate with a user-supplied credential rather than
OAuth. Enable them with their config, then call connect() with the credential —
it is verified live and only stored on success.
from nospoon_integrations import IntegrationClient
from nospoon_integrations.providers import SanityConfig, SanityConnectInput
from nospoon_integrations.storage import MemoryTokenStorage
integrations = IntegrationClient(storage=MemoryTokenStorage(), sanity=SanityConfig())
# Verify + store the connection (raises CredentialVerificationError if invalid)
await integrations.sanity.connect(
user_id,
SanityConnectInput(project_id="abc123", dataset="production", token=os.environ["SANITY_TOKEN"]),
)
# Post a blog entry as a draft (HTML body is converted to Portable Text)
result = await integrations.sanity.create_post(
user_id, title="Hello", body="<p>First post</p>", publish=True
)
Providers
- Google — Gmail API, OAuth
- HubSpot — CRM contacts, OAuth
- Facebook — Graph API, Pages
- LinkedIn — Posts, OAuth
- X (Twitter) — Tweets, OAuth 2.0 + PKCE
- WordPress — self-hosted REST API, credential-based (Application Passwords)
- Sanity — Actions/Assets/Query APIs, credential-based (robot token); includes a dependency-free
html_to_portable_text()converter
Documentation
See the main documentation for full usage details.
License
MIT
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 nospoon_integrations-0.13.0.tar.gz.
File metadata
- Download URL: nospoon_integrations-0.13.0.tar.gz
- Upload date:
- Size: 53.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d94629637336993e4970ea634d7bee4487fd494d6d1965afc78f3e0b96d68d
|
|
| MD5 |
fa705f77a569b068e9f25f43faac357f
|
|
| BLAKE2b-256 |
cfedbc92baf5fe93e46fbbbfa87c5690452febd39e0df443c4eabdcce9aa8dc0
|
Provenance
The following attestation bundles were made for nospoon_integrations-0.13.0.tar.gz:
Publisher:
publish-pypi.yml on nospoonai/nospoon-integrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nospoon_integrations-0.13.0.tar.gz -
Subject digest:
43d94629637336993e4970ea634d7bee4487fd494d6d1965afc78f3e0b96d68d - Sigstore transparency entry: 1871636931
- Sigstore integration time:
-
Permalink:
nospoonai/nospoon-integrations@abb77fface048d8ffbed5da95b742690c2891de9 -
Branch / Tag:
refs/tags/v0.13.0 - Owner: https://github.com/nospoonai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@abb77fface048d8ffbed5da95b742690c2891de9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nospoon_integrations-0.13.0-py3-none-any.whl.
File metadata
- Download URL: nospoon_integrations-0.13.0-py3-none-any.whl
- Upload date:
- Size: 44.0 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 |
869a2876b33f1e9328bade757cfe798147a471922187aa6a1f96b5e58b00cec1
|
|
| MD5 |
3b3fb49257bcbfb0f83a490040024035
|
|
| BLAKE2b-256 |
d758d7d389178c63a133c8191f6db502bce25f4611703e79abc4883963d91dd9
|
Provenance
The following attestation bundles were made for nospoon_integrations-0.13.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on nospoonai/nospoon-integrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nospoon_integrations-0.13.0-py3-none-any.whl -
Subject digest:
869a2876b33f1e9328bade757cfe798147a471922187aa6a1f96b5e58b00cec1 - Sigstore transparency entry: 1871637019
- Sigstore integration time:
-
Permalink:
nospoonai/nospoon-integrations@abb77fface048d8ffbed5da95b742690c2891de9 -
Branch / Tag:
refs/tags/v0.13.0 - Owner: https://github.com/nospoonai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@abb77fface048d8ffbed5da95b742690c2891de9 -
Trigger Event:
release
-
Statement type: