Python SDK for implementing collab-editor storage providers
Project description
collab-editor-provider
Python SDK for implementing collab-editor storage providers.
Installation
pip install collab-editor-provider
With FastAPI support:
pip install collab-editor-provider[fastapi]
For the latest dev build (published on every push to main):
pip install --pre collab-editor-provider
Quick Start
from collab_editor_provider import Provider, ContentResult, create_fastapi_router, serve
from fastapi import FastAPI
class MyProvider(Provider):
async def read_content(self, document_id: str) -> ContentResult:
text = read_from_your_storage(document_id)
return ContentResult(content=text, mime_type="text/plain")
async def write_content(self, document_id: str, content: str, mime_type: str) -> None:
save_to_your_storage(document_id, content)
# Option 1: FastAPI router
app = FastAPI()
app.include_router(create_fastapi_router(MyProvider()), prefix="/collab")
# Option 2: Standalone server
serve(MyProvider(), port=8081)
# Option 3: Manual processing
from collab_editor_provider import ProviderProcessor
processor = ProviderProcessor(MyProvider())
result = await processor.process_store(document_id, updates)
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 collab_editor_provider-0.1.0.dev4.tar.gz.
File metadata
- Download URL: collab_editor_provider-0.1.0.dev4.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d61787f31c0e3655e5624991da29f68de5f5d75496a2a067037fc4eaf2bdb363
|
|
| MD5 |
c5bf2bd462ffe8a7f01feffaef0ebdf5
|
|
| BLAKE2b-256 |
ca7a0b9b6169e7d75d746ca6d83361e45e27ec3ad2d24ca0650e19b3657140b5
|
Provenance
The following attestation bundles were made for collab_editor_provider-0.1.0.dev4.tar.gz:
Publisher:
pypi-publish.yml on imyousuf/collab-editor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
collab_editor_provider-0.1.0.dev4.tar.gz -
Subject digest:
d61787f31c0e3655e5624991da29f68de5f5d75496a2a067037fc4eaf2bdb363 - Sigstore transparency entry: 1398097475
- Sigstore integration time:
-
Permalink:
imyousuf/collab-editor@d019ea30a750574521e2a4820a3bc5c318254928 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/imyousuf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@d019ea30a750574521e2a4820a3bc5c318254928 -
Trigger Event:
push
-
Statement type:
File details
Details for the file collab_editor_provider-0.1.0.dev4-py3-none-any.whl.
File metadata
- Download URL: collab_editor_provider-0.1.0.dev4-py3-none-any.whl
- Upload date:
- Size: 16.9 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 |
fe94cb7d88c7d2069d626f3963aaeb67f0872fb7698b2412351a7867990fafbe
|
|
| MD5 |
73fa741f8a51c00f64470af7cbb651b6
|
|
| BLAKE2b-256 |
0aa8e3193385dcd0db85961f588f164b26bcb06483db09e97b9180d5c7175edd
|
Provenance
The following attestation bundles were made for collab_editor_provider-0.1.0.dev4-py3-none-any.whl:
Publisher:
pypi-publish.yml on imyousuf/collab-editor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
collab_editor_provider-0.1.0.dev4-py3-none-any.whl -
Subject digest:
fe94cb7d88c7d2069d626f3963aaeb67f0872fb7698b2412351a7867990fafbe - Sigstore transparency entry: 1398097488
- Sigstore integration time:
-
Permalink:
imyousuf/collab-editor@d019ea30a750574521e2a4820a3bc5c318254928 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/imyousuf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@d019ea30a750574521e2a4820a3bc5c318254928 -
Trigger Event:
push
-
Statement type: