Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.

weltenfw

WeltenHub Client Framework — typed REST client and Pydantic v2 schemas for the WeltenHub Story Universe API.

CI PyPI Python License: MIT

Installation

pip install weltenfw                  # core (httpx + pydantic)
pip install weltenfw[django]          # + Django AppConfig + DjangoCache
pip install weltenfw[authoring]       # + authoringfw adapter

Quick Start

from weltenfw import WeltenClient
from weltenfw.schema.world import WorldCreateInput

with WeltenClient(
    base_url="https://weltenforger.com/api/v1",
    token="your-token",
) as client:
    # Create a world
    world = client.worlds.create(WorldCreateInput(
        name="Aldoria",
        setting_era="medieval",
        description="A kingdom of runes and magic.",
    ))
    print(world.id, world.name)

    # List with pagination
    for w in client.worlds.iter_all():
        print(w.name)

    # Lookup cache
    genres = client.lookups.genres()   # cached after first call

Async

async with WeltenClient(base_url=..., token=...) as client:
    world = await client.worlds.aget(world_id)
    worlds = await client.worlds.alist()

Django Integration

# settings.py
INSTALLED_APPS = [..., "weltenfw.django"]
WELTENHUB_URL   = "https://weltenforger.com/api/v1"
WELTENHUB_TOKEN = env("WELTENHUB_TOKEN")

# views.py / services.py
from weltenfw.django import get_client
client = get_client()   # lazy singleton, per worker

Tenant Provisioning (S2S)

from weltenfw.schema.tenant import ProvisionRequest

result = client.tenants.provision(ProvisionRequest(
    username="hugo",
    email="hugo@example.com",
    display_name="Hugo",
))
# ProvisionResponse(token="...", tenant_id=UUID("..."), created=True)

Architecture

  • 1 Client = 1 Token = 1 Tenant — Multi-tenant consumers instantiate one client per tenant token.
  • Pydantic v2 — all responses validated into typed schemas (frozen=True).
  • Separate Input schemas — *CreateInput for POST, *UpdateInput for PATCH.
  • Lookup cache — pluggable CacheBackend (NullCache default, MemoryCache, DjangoCache for Redis).
  • Trailing-slash normalization — prevents silent POST→GET method loss on Django's 301 redirect.

Links

Metadata

Release files for weltenfw 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weltenfw 0.1.0
File Size Uploaded Provenance
weltenfw-0.1.0.tar.gz 19.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for weltenfw 0.1.0
File Interpreter ABI Platform
weltenfw-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.8 kB

Release files / weltenfw-0.1.0.tar.gz

Download URL weltenfw-0.1.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e8282507a4555b0ce4b262098e8491d7daf106edd492c8175ab5fac5fe4854d2
BLAKE2b-256 checksum
How to use checksums
25f7262460e233c342218c1b12974999293e2173f2f6320ccafe3ec5d3dfbe72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / weltenfw-0.1.0-py3-none-any.whl

Download URL weltenfw-0.1.0-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d61ead2c4dbbf73041f56e5dc72b5dbe7022d752ce823d178a55a3ca90787629
BLAKE2b-256 checksum
How to use checksums
c6bc1087b1a11d928cef91d0d49450b5a3131da6bb398722283435614a460162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for weltenfw 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page