Skip to main content

Shared Python core for building an Inkwire blog-post receiver.

Project description

inkwire-receiver-core

Shared Python core for building an Inkwire receiver. It validates incoming posts, derives SEO metadata, safely renders Markdown, resolves slugs, and upserts through a storage interface you provide.

pip install "inkwire-receiver-core[fastapi]"
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from inkwire_receiver import MemoryStore, handle_post

app = FastAPI()
store = MemoryStore()  # Replace with your database-backed store.


@app.post("/api/posts")
async def create_post(request: Request):
    try:
        body = await request.json()
    except Exception:
        body = None

    status, response, headers = await handle_post(
        request.headers.get("authorization"),
        body,
        ["your-api-key"],
        store,
    )
    return JSONResponse(status_code=status, content=response, headers=headers)

MemoryStore is intended for local development and tests. Production sites should provide an asynchronous store implementing find_by_external_id, find_by_slug, and upsert. See the protocol specification for the complete wire and storage semantics.

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

inkwire_receiver_core-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

inkwire_receiver_core-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file inkwire_receiver_core-0.1.0.tar.gz.

File metadata

  • Download URL: inkwire_receiver_core-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for inkwire_receiver_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25b469fade19c685995a4ac2f601fd1cee312bf7e945167aee620108fd4d3d5c
MD5 3058755302caa0874970163508d4578b
BLAKE2b-256 53e0b9fd46b1f80db879272a55723541c441456f1ee7371dd52d9ae1cd471ddd

See more details on using hashes here.

File details

Details for the file inkwire_receiver_core-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: inkwire_receiver_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for inkwire_receiver_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f664a40cc8e927b35ad6fcd11ad8b13269e4a92735a8e06ac3404ca82669b0b
MD5 c0f27077b4a644d280f6ac2273185991
BLAKE2b-256 04570c6fa1572372b185b6c8623f8e210932e8749e29b1f4de0aec75dbeabfac

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