Skip to main content

Shared Django utilities for LightWave Media projects

Project description

lightwave-core

Shared Django utilities for LightWave Media projects.

Installation

# Local development (from workspace root)
uv pip install -e packages/lightwave-core

# With billing support (Stripe)
uv pip install -e "packages/lightwave-core[billing]"

# In a project's requirements.txt
-e file:../../packages/lightwave-core

Modules

Storage (lightwave.storage)

CDN and S3 storage backends for static files and media.

from lightwave.storage import StaticStorage, PublicMediaStorage, PrivateMediaStorage

# In settings.py
STORAGES = {
    "staticfiles": {"BACKEND": "lightwave.storage.StaticStorage"},
    "default": {"BACKEND": "lightwave.storage.PublicMediaStorage"},
}

# Configure static file prefix per project
LIGHTWAVE_STATIC_PREFIX = "static/my-project"

Utils (lightwave.utils)

Common utilities including BaseModel, timezone helpers, slug generation.

from lightwave.utils import BaseModel, get_common_timezones, get_next_unique_slug

class MyModel(BaseModel):
    # Automatically has created_at and updated_at fields
    name = models.CharField(max_length=100)

Auth (lightwave.auth)

Base user model and authentication helpers.

from lightwave.auth import BaseCustomUser, validate_profile_picture

class CustomUser(BaseCustomUser):
    # Inherits avatar, language, timezone, gravatar support
    # Add project-specific fields
    stripe_customer = models.ForeignKey(...)

Chat (lightwave.chat)

Base models for AI chat sessions.

from lightwave.chat import BaseChatSession, BaseChatMessage, ChatTypes, MessageTypes

class Chat(BaseChatSession):
    agent_type = models.CharField(...)

class ChatMessage(BaseChatMessage):
    chat = models.ForeignKey(Chat, on_delete=models.CASCADE, related_name="messages")

Optional Dependencies

  • billing: Stripe utilities via dj-stripe (uv pip install lightwave-core[billing])
  • dev: Testing utilities (uv pip install lightwave-core[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

lightwave_core-0.3.1.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

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

lightwave_core-0.3.1-py3-none-any.whl (72.3 kB view details)

Uploaded Python 3

File details

Details for the file lightwave_core-0.3.1.tar.gz.

File metadata

  • Download URL: lightwave_core-0.3.1.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lightwave_core-0.3.1.tar.gz
Algorithm Hash digest
SHA256 113c5d957540e43dc735ad7e473be6146e9bdcda6a011d486388a80146cf7442
MD5 3895214425ec8069f058424a5fce349e
BLAKE2b-256 d1a5e35c95ebd319c64d531f8894ac758c2703217b4005556970844912051680

See more details on using hashes here.

File details

Details for the file lightwave_core-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: lightwave_core-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 72.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lightwave_core-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c4289b2788508fb6e006334da705eeb08e6ad2fd1a5745d7a24058933c9ff4
MD5 5062b1876879f0ff551179a2fe3f84c3
BLAKE2b-256 274cd61c4459fd58e764e56f040cad9860e4a0765ab8533be05c5897c1624bfc

See more details on using hashes here.

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