Skip to main content

Python SDK for integrating Velt comments, reactions, attachments, and user management into Django applications

Project description

Velt Python SDK

Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google Docs or Sheets, Recording like Loom, Huddles like Slack, and much more.

velt-py is the official backend SDK for Velt. Use it to power a self-hosted Velt backend or to call Velt's REST APIs directly from any Python service.

The SDK exposes two independent backends:

Backend Namespace Use case
Self-hosting sdk.selfHosting.* Store Velt data in your own MongoDB + AWS S3
REST API sdk.api.* Call Velt's REST APIs directly — no database required
  • Self-hosting (sdk.selfHosting.*) simplifies backend implementation by up to 90%. Pass your DB and storage configs to the SDK, call the relevant method with the raw frontend request payload, and return the response directly to the client.
  • REST API (sdk.api.*) provides fully-typed @dataclass request objects across all Velt REST services, returning raw Velt API responses. No database or AWS configuration needed.

Features

With Velt you can add powerful collaboration features to your backend extremely fast:

  • Comments like Figma, Frame.io, Google Docs, Sheets and more
  • Recording like Loom (audio, video, screen)
  • Huddle like Slack (audio, video, screensharing)
  • In-app and off-app notifications
  • @mentions and assignment
  • Presence, Cursors, Live Selection
  • Live state sync and multiplayer editing with conflict resolution (CRDT)
  • Activities, access control, GDPR data tooling, and AI-powered agents & workflows
  • ... and so much more

Installation

pip install velt-py

Requirements

  • Python 3.8+
  • MongoDB 6+ (Percona Server or MongoDB Atlas) for self-hosting
  • requests for REST API calls (installed automatically)
  • pymongo and boto3 for the self-hosting backend (MongoDB + optional S3 attachments)

Quick Start

Initialize the SDK

Self-hosting (MongoDB + optional AWS S3):

from velt_py import VeltSDK

sdk = VeltSDK.initialize({
    'database': {
        'connection_string': 'mongodb+srv://user:pass@cluster.mongodb.net/velt-db',
        # Or pass individual components:
        # 'host': 'localhost:27017',
        # 'username': 'your-username',
        # 'password': 'your-password',
        # 'auth_database': 'admin',
        # 'database_name': 'velt-db',
    },
    'apiKey': 'YOUR_VELT_API_KEY',       # or set VELT_API_KEY
    'authToken': 'YOUR_VELT_AUTH_TOKEN', # or set VELT_AUTH_TOKEN
})

REST API only (no database needed):

from velt_py import VeltSDK

sdk = VeltSDK.initialize({
    'apiKey': 'YOUR_VELT_API_KEY',
    'authToken': 'YOUR_VELT_AUTH_TOKEN',
})

# All sdk.api.* services are now available
result = sdk.api.organizations.getOrganizations(
    GetOrganizationsRequest(organizationIds=['org-123'])
)

Self-hosting example

Each self-hosting method takes a single typed resolver-request object — build it from the incoming frontend JSON with from_dict(data) and return the result straight to the client:

from velt_py import GetCommentResolverRequest

result = sdk.selfHosting.comments.getComments(
    GetCommentResolverRequest.from_dict(data)
)

REST API example

Each sdk.api.* method takes a single typed request dataclass:

from velt_py.models.comment_annotation_api import AddCommentAnnotationsRequest

sdk.api.commentAnnotations.addCommentAnnotations(
    AddCommentAnnotationsRequest(
        organizationId='org-123',
        documentId='doc-1',
        commentAnnotations=[{
            'location': {'id': 'section-1', 'locationName': 'Introduction'},
            'commentData': [{
                'commentText': 'This needs review',
                'from': {'userId': 'user-1', 'name': 'John Doe', 'email': 'john@example.com'},
            }],
        }],
    )
)

Framework integration

Initialize the SDK once and reuse it across requests. For example, with FastAPI:

from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from velt_py import VeltSDK, GetCommentResolverRequest

app = FastAPI()
sdk = VeltSDK.initialize({'database': {'connection_string': 'mongodb+srv://...'}})

@app.post('/api/velt/comments/get')
async def get_comments(request: Request):
    data = await request.json()
    result = sdk.selfHosting.comments.getComments(GetCommentResolverRequest.from_dict(data))
    return JSONResponse(content=result, status_code=result.get('statusCode', 200))

See the Python SDK documentation for Django, Flask, and FastAPI integration guides.

Shutdown

Call sdk.close() during graceful shutdown to release the database connection pool:

sdk.close()

Documentation

Use cases

  • Explore use cases to learn how collaboration could look on your product.
  • Figma Template: visualize what collaboration features could look like on your product.

Releases

Security

  • Velt is SOC2 Type 2 and HIPAA compliant. Learn more

Community

  • X: updates, announcements, and general Velt tips.
  • Discord: ask questions and share tips.

License

MIT

Support

For issues and questions, contact support@velt.dev or visit docs.velt.dev.

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

velt_py-0.1.13.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

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

velt_py-0.1.13-py3-none-any.whl (110.6 kB view details)

Uploaded Python 3

File details

Details for the file velt_py-0.1.13.tar.gz.

File metadata

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

File hashes

Hashes for velt_py-0.1.13.tar.gz
Algorithm Hash digest
SHA256 f6f6dcaada263f4864be5dad935bafe069c45148761d84a58fd4aaf5465ac9b0
MD5 77f978d6782931782966699d0f8d6a19
BLAKE2b-256 5fd47cd4e3d9e24fb74d039102368d8b1bb5e2631fe476cc2a81f9f4851a3fc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for velt_py-0.1.13.tar.gz:

Publisher: publish.yml on snippyly/velt-py-sdk

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

File details

Details for the file velt_py-0.1.13-py3-none-any.whl.

File metadata

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

File hashes

Hashes for velt_py-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 674a75e3590aa0217248ff25feb49cd3ac7a244ffdc840306b6c64b04ece9524
MD5 470b12312280ace0297a7cb2ecc8c933
BLAKE2b-256 e16d0c24893b4c580a299d9f73ef06fef937886189b1965e6fe980466b8143ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for velt_py-0.1.13-py3-none-any.whl:

Publisher: publish.yml on snippyly/velt-py-sdk

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